openwrt/staging/rmilecki.git
4 years agougps: nmea: make sure date is valid
Daniel Golle [Fri, 29 May 2020 22:58:20 +0000 (23:58 +0100)]
ugps: nmea: make sure date is valid

GPS time without date was previously used to set system date:
Tue Oct 10 11:48:21 2000 user.info kernel: [  108.786639] ugps: system time differs from GPS time by more than 5 seconds. Using 2000-10-10T10:48:21 UTC as the new time
Tue Oct 10 11:49:27 2000 user.info kernel: [  174.794699] ugps: system time differs from GPS time by more than 5 seconds. Using 2020-05-26T10:49:27 UTC as the new time

Fix this by ignoring incomplete dates and wait for complete time
information before adjusting system date/time.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoar71xx: fix splitting firmware partition for TL-WR902AC v1
Adrian Schmutzler [Thu, 28 May 2020 16:30:17 +0000 (18:30 +0200)]
ar71xx: fix splitting firmware partition for TL-WR902AC v1

The -O option for the tplink-v1-header was missing for the TP-Link
TL-WR902AC v1, while safeloader and MTDPARTS where set up with a
single firmware partition.

This led to bootloops after using sysupgrade.

Fixes: FS#3118
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoqos-scripts: fix interface resolving
Jo-Philipp Wich [Fri, 29 May 2020 08:34:58 +0000 (10:34 +0200)]
qos-scripts: fix interface resolving

Also ensure that the error message is actually printed to stderr and that
the rule generation is aborted if an interface cannot be resolved.

Ref: https://github.com/openwrt/luci/issues/3975
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoccache: update to 3.7.9
DENG Qingfang [Thu, 28 May 2020 07:25:07 +0000 (15:25 +0800)]
ccache: update to 3.7.9

Update ccache to 3.7.9

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

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agobcm27xx: update to latest patches from RPi foundation
Álvaro Fernández Rojas [Thu, 28 May 2020 17:08:55 +0000 (19:08 +0200)]
bcm27xx: update to latest patches from RPi foundation

Also removes random module and switches to new bcm2711 thermal driver.
Boot tested on RPi 4B v1.1 4G.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx-userland: update to latest version
Álvaro Fernández Rojas [Thu, 28 May 2020 13:27:17 +0000 (15:27 +0200)]
bcm27xx-userland: update to latest version

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agoprocd: update to git HEAD
Daniel Golle [Thu, 28 May 2020 13:27:51 +0000 (14:27 +0100)]
procd: update to git HEAD

 b84a329 jail: use sane termios settings for console pts
 b9b39e2 jail: handle containers seperately

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agohostapd: Add disable_vht when using NOHT/HT* modes
Enrique Rodríguez Valencia [Tue, 12 May 2020 17:37:28 +0000 (19:37 +0200)]
hostapd: Add disable_vht when using NOHT/HT* modes

disable_vht parameter needs to be set when using wpa_supplicant NOHT/HT* modes.

Signed-off-by: Enrique Rodríguez Valencia <enrique.rodriguez@galgus.net>
4 years agomac80211: Fix setting radio htmode when using mesh mode
Enrique Rodríguez Valencia [Tue, 12 May 2020 17:35:43 +0000 (19:35 +0200)]
mac80211: Fix setting radio htmode when using mesh mode

When configuring the radio in legacy mode from luci, the htmode is not set
correctly to NOHT, causing the radio in mesh mode to be set to HT40.

Signed-off-by: Enrique Rodríguez Valencia <enrique.rodriguez@galgus.net>
4 years agobroadcom-wl: don't inherit lock descriptor in nas process
Jo-Philipp Wich [Thu, 28 May 2020 11:03:02 +0000 (13:03 +0200)]
broadcom-wl: don't inherit lock descriptor in nas process

Add a local hack to prevent the Broadcom WPA authenticator process from
inheriting the lock descriptor 1000 used to prevent concurrent executions
of the init script.

Without this fix, repeated invocations of /etc/init.d/network, e.g. for
obtaining the enabled state, would hang forever.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agobcm27xx-userland: update to latest version with 64 bit support
Álvaro Fernández Rojas [Thu, 28 May 2020 08:46:17 +0000 (10:46 +0200)]
bcm27xx-userland: update to latest version with 64 bit support

Support for 64 bits has been remove on latest master of raspberry/firmware.
Update to latest commit with 64 bit support since we don't support
installing 32 bit packages on 64 bit targets.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agolinux: mvebu: backport mvneta XDP support fixes
Jakov Petrina [Mon, 25 May 2020 12:14:40 +0000 (14:14 +0200)]
linux: mvebu: backport mvneta XDP support fixes

This patch backports additional fixes for XDP support in the mvneta driver. These
changes are found upstream as commits:

b37fa92e20ef2 net: mvneta: fix build skb for bm capable devices
f383b2950070c net: mvneta: rely on page_pool_recycle_direct in mvneta_run_xdp
79572c98c554d mvneta driver disallow XDP program on hardware buffer management
44efc78d0e464 net: mvneta: fix XDP support if sw bm is used as fallback

Signed-off-by: Jakov Petrina <jakov.petrina@sartura.hr>
4 years agolinux: mvebu: backport mvneta XDP support
Jakov Petrina [Fri, 15 May 2020 10:52:35 +0000 (12:52 +0200)]
linux: mvebu: backport mvneta XDP support

This patch backports XDP support in the mvneta driver used by Marvell ARMADA 37x,
38x and 37xx series SoCs. Supported actions are:

- XDP_DROP
- XDP_PASS
- XDP_REDIRECT
- XDP_TX

Patches are present upstream as following commits:

b0a43db9087a net: mvneta: add XDP_TX support
9e58c8b41065 net: mvneta: make tx buffer array agnostic
fa383f6b77a2 net: mvneta: move header prefetch in mvneta_swbm_rx_frame
0db51da7a8e9 net: mvneta: add basic XDP support
8dc9a0888f4c net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine
568a3fa24a95 net: mvneta: introduce page pool API for sw buffer manager
ff519e2acd46 net: mvneta: introduce mvneta_update_stats routine

Signed-off-by: Jakov Petrina <jakov.petrina@sartura.hr>
4 years agopackages/utils: fbtest fix Makefile
Thibaut VARÈNE [Thu, 21 May 2020 15:40:54 +0000 (17:40 +0200)]
packages/utils: fbtest fix Makefile

The clean target tries to remove what looks like a bogus 'rbcfg',
probably carried over copy-pasta. Remove the name of the generated
executable ('fbtest') instead.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Fixes: 8099f4e0d3af ("fbtest utility ")
4 years agopackage/base-files: caldata: work around dd's limitation
Thibaut VARÈNE [Sat, 16 May 2020 20:18:15 +0000 (22:18 +0200)]
package/base-files: caldata: work around dd's limitation

tl;dr: dd will silently truncate the output if reading from special
files (e.g. sysfs attributes) with a too large bs parameter.

This problem was exposed on some RouterBOARD ipq40xx devices which use a
caldata payload which is larger than PAGE_SIZE, contrary to all other
currently supported RouterBOARD devices: the caldata would fail to
properly load with the current scripts.

Background: dd doesn't seem to correctly handle read() results that
return less than requested data. sysfs attributes have a kernel exchange
buffer which is at most PAGE_SIZE big, so only 1 page can be read() at a
time. In this case, if bs is larger than PAGE_SIZE, dd will silently
truncate blocks to PAGE_SIZE. With the current scripts using bs=<size>
count=1, the data is truncated to PAGE_SIZE as soon as the requested
<size> exceeds this value.

This commit works around this problem by using `cat` in the caldata
routines that can read from a file (routines that read from mtd devices
are untouched). cat correctly handles partial read requests. The output
is then piped to dd with the same parameters as before, to ensure that
the resulting file remains exactly the same.

This is a simple workaround, the downside is that it uses a pipe and one
more executable, and therefore has a larger memory footprint and is
slower. This is deemed acceptable considering these routines are only
used at boot time.

Tested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agopackages/boot: remove rbcfg
Thibaut VARÈNE [Thu, 21 May 2020 15:20:55 +0000 (17:20 +0200)]
packages/boot: remove rbcfg

The new sysfs soft_config driver makes buggy rbcfg obsolete and
entirely replaces it.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agogeneric: routerboot sysfs: soft_config support for ath79 cpufreq
Thibaut VARÈNE [Fri, 15 May 2020 16:02:02 +0000 (18:02 +0200)]
generic: routerboot sysfs: soft_config support for ath79 cpufreq

This commit introduces support for R/W access to the CPU frequency
setting of routerboot on ath79 hardware.

On unsupported hardware, the sysfs attribute will expose the raw tag
value (read-only) to help with reverse engineering its meaning.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agogeneric: routerboot sysfs: move tag_show_u32()
Thibaut VARÈNE [Fri, 15 May 2020 16:00:08 +0000 (18:00 +0200)]
generic: routerboot sysfs: move tag_show_u32()

This routine will be shared between hard and soft config drivers.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agogeneric: routerboot sysfs: add support for soft_config
Thibaut VARÈNE [Wed, 13 May 2020 20:12:41 +0000 (22:12 +0200)]
generic: routerboot sysfs: add support for soft_config

This driver exposes the data encoded in the "soft_config" flash segment
of MikroTik RouterBOARDs devices. It presents the data in a sysfs folder
named "soft_config" through a set of human-and-machine-parseable
attributes. Changes can be discarded by writing 0 to the 'commit'
attribute, or they can be committed to flash storage by writing 1.

This driver does not reuse any of the existing code previously found in
the "rbcfg" utility and makes this utility obsolete by providing a clean
sysfs interface.

Like "rbcfg", this driver requires 4K_SECTORS support since the flash
partition in which these parameters are stored is typically 4KB in size.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agogeneric: routerboot sysfs: move tag_show_string()
Thibaut VARÈNE [Wed, 13 May 2020 16:43:30 +0000 (18:43 +0200)]
generic: routerboot sysfs: move tag_show_string()

This routine will be shared between hard and soft config drivers.
Also use scnprintf() instead of snprintf().

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agogeneric: platform/mikrotik: rb_hardconfig.c minor fixes
Thibaut VARÈNE [Wed, 13 May 2020 16:42:45 +0000 (18:42 +0200)]
generic: platform/mikrotik: rb_hardconfig.c minor fixes

For the sake of strictly typed code, add a missing const qualifier.
Add a missing return value in error path.
Check the return value of mtd_read(), for good measure.
Also demote the error printks of failed sysfs file creation to warn
level since they are not fatal in the init() sequence.
Finally, add a note regarding PAGE_SIZE and clarify a comment.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agogeneric: platform/mikrotik: reorder Kconfig
Thibaut VARÈNE [Sat, 16 May 2020 06:14:48 +0000 (08:14 +0200)]
generic: platform/mikrotik: reorder Kconfig

The depends and select should apply to the sysfs driver, not the meta
config.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agocypress-firmware: add PROVIDES sections
Álvaro Fernández Rojas [Thu, 28 May 2020 08:26:52 +0000 (10:26 +0200)]
cypress-firmware: add PROVIDES sections

Some firmwares are already provided by linux-firmware.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx: update patches from RPi foundation
Álvaro Fernández Rojas [Wed, 27 May 2020 13:12:04 +0000 (15:12 +0200)]
bcm27xx: update patches from RPi foundation

bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx-gpu-fw: update to latest version
Álvaro Fernández Rojas [Thu, 28 May 2020 07:43:02 +0000 (09:43 +0200)]
bcm27xx-gpu-fw: update to latest version

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx: remove linux 4.19 support
Álvaro Fernández Rojas [Wed, 27 May 2020 15:29:45 +0000 (17:29 +0200)]
bcm27xx: remove linux 4.19 support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agoath79: add support for COMFAST CF-E130N v2
Pavel Balan [Fri, 27 Mar 2020 03:32:55 +0000 (03:32 +0000)]
ath79: add support for COMFAST CF-E130N v2

This patch adds support for the COMFAST CF-E130N v2, an outdoor wireless
CPE with a single Ethernet port and a 802.11bgn radio.

Specifications:

 - QCA9531 SoC
 - 1x 10/100 Mbps Ethernet with PoE-in support
 - 64 MB of RAM (DDR2)
 - 16 MB of FLASH
 - 5 dBi built-in antenna
 - POWER/LAN/WLAN green LEDs
 - 4x RSSI LEDs (2x red, 2x green)
 - UART (115200 8N1) and GPIO (J9) headers on PCB

Flashing instructions:

 The original firmware is based on OpenWrt so a sysupgrade image can be
 installed via the stock web GUI.

 The U-boot bootloader also contains a backup TFTP client to upload the
 firmware from. Upon boot, it checks its ethernet network for the IP
 192.168.1.10. Host a TFTP server and provide the image to be flashed as
 file firmware_auto.bin.

MAC address setup:

The art partition contains four consecutive MAC addresses:

0x0    aa:bb:cc:xx:xx:c4
0x6    aa:bb:cc:xx:xx:c6
0x1002 aa:bb:cc:xx:xx:c5
0x5006 aa:bb:cc:xx:xx:c7

However, the manufacturer in its infinite wisdom decided that one address
is enough and both eth0 and WiFi get the MAC address from 0x0 (yes, that's
overwriting the existing and valid address in 0x1002). This is obviously
also the address on the device's label.

Signed-off-by: Pavel Balan <admin@kryma.net>
[fix configs partition, fix IMAGE_SIZE, add MAC address comment, rename
ATH_SOC to SOC]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: replace tab after DT label by space
Adrian Schmutzler [Wed, 27 May 2020 22:48:39 +0000 (00:48 +0200)]
ath79: replace tab after DT label by space

The common separator in this case is a single space.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: fix LED DT label for Zyxel Keenetic Start
Adrian Schmutzler [Wed, 27 May 2020 16:30:56 +0000 (18:30 +0200)]
ramips: fix LED DT label for Zyxel Keenetic Start

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agomusl: restore lock skipping for mostly-singlethreaded programs, and related patches
Matthias Schiffer [Sat, 23 May 2020 19:17:15 +0000 (21:17 +0200)]
musl: restore lock skipping for mostly-singlethreaded programs, and related patches

The remainder of the patch series proposed by upstream [2] for the locking
synchronization issue [1].

[1] https://www.openwall.com/lists/musl/2020/05/22/3
[2] https://www.openwall.com/lists/musl/2020/05/22/10

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
4 years agomusl: fix locking synchronization bug
Matthias Schiffer [Sat, 23 May 2020 19:16:44 +0000 (21:16 +0200)]
musl: fix locking synchronization bug

Import proposed upstream fix [2] for the critical locking
synchronization bug recently found in musl [1].

This affects all programs that are temporarily multithreaded, but then
return to single-threaded operation.

[1] https://www.openwall.com/lists/musl/2020/05/22/3
[2] https://www.openwall.com/lists/musl/2020/05/22/10

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
4 years agoath79: increase spi clock for D-Link DIR-842
Sebastian Schaper [Tue, 19 May 2020 10:40:17 +0000 (12:40 +0200)]
ath79: increase spi clock for D-Link DIR-842

AHB is 258 MHz for this device (CPU_PLL / 3), but there is no difference
between 64 MHz and 50 MHz for spi-max-frequency, thus increase to 50 MHz.

Tested on revisions C1 and C3.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
4 years agoath79: define switch reset-gpios for D-Link DIR-842
Sebastian Schaper [Tue, 19 May 2020 10:38:21 +0000 (12:38 +0200)]
ath79: define switch reset-gpios for D-Link DIR-842

GPIO 11 needs to be pulled high for the external gigabit switch to work,
this is currently solved via gpio-hog. Replace with phy0 reset-gpios.

Tested on revisions C1 and C3. Reset button is still working for reboot,
to enter failsafe, and to enter bootloader http recovery.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
4 years agoath79: fix LEDs for D-Link DIR-842
Sebastian Schaper [Tue, 19 May 2020 10:34:53 +0000 (12:34 +0200)]
ath79: fix LEDs for D-Link DIR-842

The device has a total of 8 LEDs, 5 of which are controlled by the switch
(LAN 1-4, WAN). Only power, wifi and wps are controlled by the SoC.

 * led_power is on GPIO 5 (not 15), boot flashing sequence is now visible
 * remove led 'internet', since it is only connected to the switch
 * remove ucidef_set_led_switch for WAN from 01_leds, as it has no effect

Tested on revisions C1 and C3.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
[adjust commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoglibc: update to latest 2.31 commit (BZ #25976, BZ #25824)
Hans Dedecker [Tue, 26 May 2020 20:21:46 +0000 (22:21 +0200)]
glibc: update to latest 2.31 commit (BZ #25976, BZ #25824)

3a44844c97 nss_compat: internal_end*ent may clobber errno, hiding ERANGE [BZ #25976]
c839175267 aarch64: fix strcpy and strnlen for big-endian [BZ #25824]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agoramips: create shared DTSI for DIR-810L and TEW-810DR
Adrian Schmutzler [Tue, 26 May 2020 19:44:54 +0000 (21:44 +0200)]
ramips: create shared DTSI for DIR-810L and TEW-810DR

These devices seem to have the same board, so let's have a common
file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: add support for TRENDnet TEW-810DR
J. Scott Heppler [Tue, 26 May 2020 01:24:40 +0000 (18:24 -0700)]
ramips: add support for TRENDnet TEW-810DR

Specifications:

* MediaTek MT7620A (580 Mhz)
* 8 MB of FLASH
* 64 MB of RAM
* 2.4Ghz and 5.0Ghz radios
* 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
* UART header on PCB (57600 8n1)
* Green/Orange Power LEDs illuminating a Power-Button Lens
* Green/Orange Internet LEDs GPIO controlled illuminating a Globe/Internet Lens
* 3x button - wps, power and reset
* U-boot bootloader

Installation:

The sysupgrade.bin image is reported to be OEM web flashed with an ncc_att_hwid
appended.  ncc_att_hwid is a 32bit binary in the GPL Source download for either
the TEW-810DR or DIR-810L and is located at
source/user/wolf/cameo/ncc/hostTools.

The invocation is: ncc_att_hwid -f tew-810dr-squashfs-factory.bin -a -m "TEW-810DR" -H "1.0R" -r "WW" -c "1.0"

This may need to be altered if your hardware version is "1.1R".

The image can also be directly flashed via serial tftp:
1.  Load *.sysupgrade.bin to your tftp server directory and rename for
    convenience.
2.  Set a static ip 192.168.10.100.
3.  NIC cable to a lan port.
4.  Serial connection parameters 57600,8N1
5.  Power on the TEW-810 and press 4 for a u-boot command line prompt.
6.  Verify IP's with U-Boot command "printenv".
7.  Adjust tftp settings if needed per the tftp documentation
8.  Boot the tftp image to test the build.
9.  If the image loads, reset your server ip to 192.168.1.10 and restart network.
10. Log in to Luci, 192.168.1.1, and flash the *sysupgrade.bin image.

Notes:

The only valid MAC address is found in 0x28 of the factory partition.
Other typical offsets/caldata only contain example data: 00:11:22:00:0f:xx

Signed-off-by: J. Scott Heppler <shep971@centurylink.net>
[remove "link rx tx" in 01_leds, format and extend commit message,
fix DTS led node names]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agorpcd: update to latest Git HEAD
Jo-Philipp Wich [Tue, 26 May 2020 14:08:15 +0000 (16:08 +0200)]
rpcd: update to latest Git HEAD

078bb57 uci: reset uci_ptr flags when merging options during section add
3df62bc session: deny access if password login is disabled

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agouboot-envtools: ath79: add Netgear WNDR4300SW
Stijn Segers [Tue, 26 May 2020 11:28:18 +0000 (13:28 +0200)]
uboot-envtools: ath79: add Netgear WNDR4300SW

Add Netgear WNDR4300SW to the list of supported boards.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
4 years agoath79/mikrotik: add missing kernel config symbol for 5.4
Roger Pueyo Centelles [Tue, 26 May 2020 08:51:24 +0000 (10:51 +0200)]
ath79/mikrotik: add missing kernel config symbol for 5.4

The UBIFS_FS_ZSTD is exposed when UBIFS is enabled.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
[adjust commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agolibubox: update to the latest version
Felix Fietkau [Tue, 26 May 2020 08:45:06 +0000 (10:45 +0200)]
libubox: update to the latest version

86818eaa976b blob: make blob_parse_untrusted more permissive
cf2e8eb485ab tests: add fuzzer seed file for crash in blob_len
c2fc622b771f blobmsg: fix length in blobmsg_check_array
639c29d19717 blobmsg: simplify and fix name length checks in blobmsg_check_name
66195aee5042 blobmsg: fix missing length checks

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agokernel: properly insert local mtd partition parsers
Adrian Schmutzler [Mon, 25 May 2020 16:08:25 +0000 (18:08 +0200)]
kernel: properly insert local mtd partition parsers

Between 4.19 and 5.4, the kernel moved the partition parsers into
the parsers subdirectory. This led to some necessary rebasing of
our local patches for parsers, which partially has been performed
without caring about where the code was inserted.

This commit tries to adjust our local patches so that parsers are
inserted at the "proper" positions with respect to alphabetic sorting
(if possible). Thus, the commit is cosmetic.

While this might look useless now, it will make life easier when
adding other parsers in the future or for rebasing on kernel changes.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokernel: remove a bunch of trailing whitespaces
Adrian Schmutzler [Mon, 25 May 2020 16:53:23 +0000 (18:53 +0200)]
kernel: remove a bunch of trailing whitespaces

These trailing whitespaces were reported during kernel patch refresh.

While at it, harmonize a few indents as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokernel: drop backported gpio emulated open drain output fix
Adrian Schmutzler [Mon, 25 May 2020 16:24:54 +0000 (18:24 +0200)]
kernel: drop backported gpio emulated open drain output fix

This patch has been backported to stable kernel 5.4 already.

Remove our local patch explicitly now, as by applying the patch
(or refreshing) the relevant code is actually added a second time.

Refresh remaining patches as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoocteon: set 5.4 as default kernel
Adrian Schmutzler [Mon, 25 May 2020 10:04:55 +0000 (12:04 +0200)]
octeon: set 5.4 as default kernel

octeon has provided 5.4 as testing kernel for some time now, let's
switch to 5.4 to have a bigger audience for testing.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoocteontx: remove support for kernel 4.14
Adrian Schmutzler [Mon, 25 May 2020 10:02:08 +0000 (12:02 +0200)]
octeontx: remove support for kernel 4.14

Kernel 5.4 is stable for about two months now and there is only a few
patches anyway, so this is mostly upstream stuff. Therefore, it does
not look like we need to keep old 4.14 around any longer.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoarchs38: remove support for kernel 4.14
Adrian Schmutzler [Mon, 25 May 2020 09:53:34 +0000 (11:53 +0200)]
archs38: remove support for kernel 4.14

Kernel 5.4 is stable for about two months now and there is only one
patch anyway, so this is mostly upstream stuff. Therefore, it does
not look like we need to keep old 4.14 around any longer.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agolayerscape: remove support for kernel 4.14
Yangbo Lu [Fri, 22 May 2020 07:08:54 +0000 (15:08 +0800)]
layerscape: remove support for kernel 4.14

Remove support for kernel 4.14, and NXP Layerscape SDK
had not supported kernel 4.14 since LSDK-20.04 either.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agobcm63xx: ar-5315u: expose LEDs through controller
Álvaro Fernández Rojas [Sun, 24 May 2020 18:19:21 +0000 (20:19 +0200)]
bcm63xx: ar-5315u: expose LEDs through controller

Exposing LEDs through LED controller instead of gpio-leds takes
advantage of HW blinking.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm63xx: ar-5387un: expose LEDs through controller
Álvaro Fernández Rojas [Sun, 24 May 2020 18:17:34 +0000 (20:17 +0200)]
bcm63xx: ar-5387un: expose LEDs through controller

Exposing LEDs through LED controller instead of gpio-leds takes
advantage of HW blinking.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm63xx: ar-5381u: expose LEDs through controller
Álvaro Fernández Rojas [Sun, 24 May 2020 18:16:30 +0000 (20:16 +0200)]
bcm63xx: ar-5381u: expose LEDs through controller

Exposing LEDs through LED controller instead of gpio-leds takes
advantage of HW blinking.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agoramips: add alternative name for Buffalo WSR-2533DHP
INAGAKI Hiroshi [Sat, 23 May 2020 22:33:48 +0000 (07:33 +0900)]
ramips: add alternative name for Buffalo WSR-2533DHP

Buffalo WSR-2533DHP is identical to the WSR-2533DHPL, Buffalo sold it
with renaming.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years agoramips: add support for Asus RT-N10P V3 / RT-N11P B1 / RT-N12 VP B1
Ernst Spielmann [Thu, 16 Apr 2020 18:42:29 +0000 (18:42 +0000)]
ramips: add support for Asus RT-N10P V3 / RT-N11P B1 / RT-N12 VP B1

Specifications:

- MT7628NN @ 580 MHz
- 32 MB RAM
- 8 MB Flash
- 5x 10/100 Mbps Ethernet (built-in switch)
- 2.4 GHz WLAN
- 2x external, non-detachable antennas (1x for RT-N10P V3)

Flash instructions:

1. Set PC network interface to 192.168.1.75/24.
2. Connect PC to the router via LAN.
3. Turn router off, press and hold reset button, then turn it on.
4. Keep the button pressed till power led starts to blink.
5. Upload the firmware file via TFTP. (Any filename is accepted.)
6. Wait until the router reboots.

Signed-off-by: Ernst Spielmann <endspiel@disroot.org>
[fix node/property name for state_default]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agolibubox: update to the latest master
Rafał Miłecki [Sun, 24 May 2020 14:30:02 +0000 (16:30 +0200)]
libubox: update to the latest master

5e75160 blobmsg: fix attrs iteration in the blobmsg_check_array_len()
eeddf22 tests: runqueue: try to fix race on GitLab CI
89fb613 libubox: runqueue: fix use-after-free bug
1db3e7d libubox: runqueue fix comment in header
7c4ef0d tests: list: add test case for list_empty iterator

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 years agoucert: update to latest git HEAD
Matthias Schiffer [Sun, 24 May 2020 15:01:36 +0000 (17:01 +0200)]
ucert: update to latest git HEAD

00b921d80ac0 Do not print line number in debug messages
96c42c5ed320 Fix length checks in cert_load()
fe06b4b836b3 usign-exec: improve usign -F output handling
19f9e1917e1b usign-exec: return code fixes
077feb5b5824 usign-exec: close writing end of pipe early in parent process
7ec4bb764e1e usign-exec: remove redundant return statements
5a738e549d31 usign-exec: change usign_f_* fingerprint argument to char[17]
112488bbbccc usign-exec: do not close stdin and stderr before exec
38dcb1a6f121 usign-exec: fix exec error handling
a9be4fb17df2 usign-exec: simplify usign execv calls
854d93e2326a Introduce read_file() helper, improve error reporting
afc86f352bf7 Fix return code of write_file()
fdff10852326 stdout/stderr improvements
dddb2aa8124d ci: fix unit test failures by enabling full ucert build
5f206bcfe5c2 ci: enable unit testing

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
4 years agoscripts/flashing/flash.sh: remove trailing whitespaces
Rosen Penev [Mon, 6 Jan 2020 02:27:08 +0000 (18:27 -0800)]
scripts/flashing/flash.sh: remove trailing whitespaces

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[cut out of patch with different subject]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoscripts/flashing/flash.sh: Add missing quotes
Rosen Penev [Mon, 6 Jan 2020 02:27:06 +0000 (18:27 -0800)]
scripts/flashing/flash.sh: Add missing quotes

These are in if statements (where they should be), and echo output that is
not piped to anything. These should be safe.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agoath79/nand: add support for Netgear WNDR4300SW
Stijn Segers [Sat, 23 May 2020 08:50:03 +0000 (10:50 +0200)]
ath79/nand: add support for Netgear WNDR4300SW

This patch adds support for the WNDR4300SW, marketed by California ISP
SureWest (hence the 'SW' suffix). Hardware wise, it's identical to the
WNDR4300 v1.

Specifications:
* SoC: Atheros AR9344
* RAM: 128 MB
* Flash: 128 MB NAND flash
* WiFi: Atheros AR9580 (5 GHz) and AR9344 (2,4 GHz)
* Ethernet: 5x 1000Base-T
* LED: Power, WAN, LAN, WiFi, USB, WPS
* UART: on board, to the right of the RF shield at the top of the board

Installation:

* Flashing through the OEM web interface:
  + Connect your computer to the router with an ethernet cable and browse
    to http://192.168.1.1/
  + Log in with the default credentials are admin:password
  + Browse to Advanced > Administration > Firmware Upgrade in the Netgear
    interface
  + Upload the Openwrt firmware: openwrt-ath79-nand-netgear_wndr4300sw-squashfs-factory.img
  + Proceed with the firmware installation and give the device a few
    minutes to finish and reboot.

* Flashing through TFTP:
  + Configure your wired client with a static IP in the 192.168.1.x range,
    e.g. 192.168.1.10 and netmask 255.255.255.0.
  + Power off the router.
  + Press and hold the RESET button (the factory reset button on the bottom
    of the device, with the red circle around it) and turn the router on
    while keeping the button pressed.
  + The power LED will start flashing orange. You can release the button
    once it switches to flashing green.
  + Transfer the image over TFTP:
    $ tftp 192.168.1.1 -m binary -c put openwrt-ath79-nand-netgear_wndr4300sw-squashfs-factory.img

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
4 years agosquashfs: Fix compile with GCC 10
Hauke Mehrtens [Sun, 24 May 2020 10:23:31 +0000 (12:23 +0200)]
squashfs: Fix compile with GCC 10

Fixes the following build error with GCC 10:
/usr/bin/ld: read_fs.o:(.bss+0x0): multiple definition of `swap'; mksquashfs.o:(.bss+0x1b2a88): first defined here
And a compile warning.

Fixes: FS#3104, FS#3119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agousign: update to latest git HEAD
Matthias Schiffer [Sat, 23 May 2020 11:38:12 +0000 (13:38 +0200)]
usign: update to latest git HEAD

f1f65026a941 Always pad fingerprints to 16 characters

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
4 years agoramips: fix 04_led_migration case syntax for mt7621
Russell Senior [Sat, 23 May 2020 08:19:50 +0000 (01:19 -0700)]
ramips: fix 04_led_migration case syntax for mt7621

Commit f761f4052c4 had bogus case syntax, the uci-defaults script threw
errors as a result and exited non-zero, probably didn't do what was
intended, but tried over and over since the non-zero exit prevents the
script from being deleted.

Fixes: f761f4052c41 ("ramips: mt7621: harmonize naming scheme for Mikrotik")
Signed-off-by: Russell Senior <russell@personaltelco.net>
[extend commit title, add Fixes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: add support for Enterasys WS-AP3705i
David Bauer [Tue, 19 May 2020 20:49:35 +0000 (22:49 +0200)]
ath79: add support for Enterasys WS-AP3705i

Hardware
--------
SoC:    Atheros AR9344
RAM:    128M DDR2
FLASH:  2x Macronix MX25L12845EM
        2x 16MiB SPI-NOR
WLAN2:  Atheros AR9344 2x2 2T2R
WLAN5:  Atheros AR9580 2x2 2T2R
SERIAL: Cisco-RJ45 on the back (115200 8n1)

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

The U-Boot CLI is password protected (using the same credentials as the
OS). Default is admin/new2day.

1. Download the OpenWrt initramfs-image. Place it into a TFTP server
   root directory and rename it to 1401A8C0.img. Configure the TFTP
   server to listen at 192.168.1.66/24.

2. Connect the TFTP server to the access point.

3. Connect to the serial console of the access point. Attach power and
   interrupt the boot procedure when prompted (bootdelay is 1 second).

4. Configure the U-Boot environment for booting OpenWrt from Ram and
   flash:

   $ setenv boot_openwrt 'setenv bootargs; bootm 0xbf230000'
   $ setenv ramboot_openwrt 'setenv serverip 192.168.1.66;
     tftpboot 0x85000000; bootm'
   $ setenv bootcmd 'run boot_openwrt'
   $ saveenv

5. Load OpenWrt into memory:

   $ run ramboot_openwrt

   Wait for the image to boot.

6. Transfer the OpenWrt sysupgrade image to the device. Write the image
   to flash using sysupgrade:

   $ sysupgrade -n /path/to/openwrt-sysuograde.bin

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agohostapd: add WEP as queryable build feature
David Bauer [Thu, 21 May 2020 07:50:37 +0000 (09:50 +0200)]
hostapd: add WEP as queryable build feature

Commit 472fd98c5b12 ("hostapd: disable support for Wired Equivalent
Privacy by default") made support for WEP optional.

Expose the WEP support to LuCi or other userspace tools using the
existing interface. This way they are able to remove WEP from the
available ciphers if hostapd is built without WEP support.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agobrcm63xx: add support for ADB P.DG A4001N A-000-1A1-AX
Daniele Castro [Mon, 2 Dec 2019 15:13:44 +0000 (16:13 +0100)]
brcm63xx: add support for ADB P.DG A4001N A-000-1A1-AX

ADB P.DG A4001N A-000-1A1-AX a.k.a. Telecom Italia ADSL2+ Wi-Fi N (AGPWI)
has the same PCB as the OpenWrt's ADB P.DG A4001N1 with LEDs connected
to different GPIO PINs in active low configuration.

OpenWrt's ADB P.DG A4001N image is made for the ADB P.DG A4001N A-000-1A1-AE.
It has different LEDs configuration and flash size/layout
w.r.t the ADB P.DG A4001N A-000-1A1-AX.

Hardware:
* Board ID: 96328avng
* SoC: Broadcom BCM6328
* RAM DDR2-800: 32 Mbyte - winbond W9725G6KB-25
* Serial flash: 16 Mbyte - MXIC MX25L 12845EMI-10G
* Ethernet: 4x Ethernet 10/100 baseT
* Wifi 2.4GHz: Broadcom Corporation BCM43224/5 Wireless Network Adapter (rev 01)
* LEDs: 2x Power, 2x ADSL, 2x Internet, 2x Wi-Fi, 2x Service
* Buttons: 1x Reset, 1x WPS (named WiFi/LED)
* UART: 1x TTL 115200n8, TX  NC  RX, on J5 connector (short R192 and R193)
                         NC  GND NC

Installation via CFE:
* Stock CFE has to be overwriten with one for 96328avng boards that can upload
  .bin images with no signature check (cfe-A4001N-V0000_96328avng.bin)
* connect a serial port to the board
* Stop the boot process after power on by pressing enter
* set static IP 192.168.1.2 and subnet mask 255.255.255.0
* navigate to http://192.168.1.1/
* upload the OpenWrt image file

Signed-off-by: Daniele Castro <danielecastro@hotmail.it>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm63xx: use model part of board name as variable in 01_leds
Adrian Schmutzler [Thu, 21 May 2020 17:41:41 +0000 (19:41 +0200)]
bcm63xx: use model part of board name as variable in 01_leds

This extracts the model part of the board name and uses it for the
LED string identifiers in 01_leds. As this makes statements more
generic, it will allow to merge more cases in the future.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm63xx: replace further "ok" with "okay" in DTS files
Adrian Schmutzler [Fri, 22 May 2020 16:26:29 +0000 (18:26 +0200)]
bcm63xx: replace further "ok" with "okay" in DTS files

While "ok" is recognized in DT parsing, only "okay" is actually
mentioned as valid value. Replace it accordingly.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: Do not build buffalo_whr-g301n by default
Hauke Mehrtens [Thu, 21 May 2020 20:16:17 +0000 (22:16 +0200)]
ath79: Do not build buffalo_whr-g301n by default

The squashfs partition is getting too big.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agomac80211: Fix build on mpc85xx target
Hauke Mehrtens [Thu, 21 May 2020 19:49:21 +0000 (21:49 +0200)]
mac80211: Fix build on mpc85xx target

This fixes the following compile error seen on the mpc85xx target:
  CC [M]  /linux-mpc85xx_p2020/backports-5.7-rc3-1/drivers/net/wireless/intersil/orinoco/main.o
In file included from /builder/shared-workdir/build/staging_dir/toolchain-powerpc_8540_gcc-8.4.0_musl/include/stddef.h:17,
                 from /linux-mpc85xx_p2020/backports-5.7-rc3-1/include/uapi/linux/wireless.h:77,
                 from /linux-mpc85xx_p2020/backports-5.7-rc3-1/include/linux/wireless.h:13,
                 from /linux-mpc85xx_p2020/backports-5.7-rc3-1/drivers/net/wireless/intersil/orinoco/main.c:89:
/builder/shared-workdir/build/staging_dir/toolchain-powerpc_8540_gcc-8.4.0_musl/include/bits/alltypes.h:106:15: error: conflicting types for 'ptrdiff_t'
 typedef _Addr ptrdiff_t;
               ^~~~~~~~~
In file included from /linux-mpc85xx_p2020/backports-5.7-rc3-1/backport-include/linux/types.h:4,
                 from ./include/linux/list.h:5,
                 from /linux-mpc85xx_p2020/backports-5.7-rc3-1/backport-include/linux/list.h:3,
                 from ./include/linux/module.h:9,
                 from /linux-mpc85xx_p2020/backports-5.7-rc3-1/backport-include/linux/module.h:3,
                 from /linux-mpc85xx_p2020/backports-5.7-rc3-1/drivers/net/wireless/intersil/orinoco/main.c:79:
./include/linux/types.h:65:28: note: previous declaration of 'ptrdiff_t' was here
 typedef __kernel_ptrdiff_t ptrdiff_t;
                            ^~~~~~~~~
scripts/Makefile.build:265: recipe for target '/linux-mpc85xx_p2020/backports-5.7-rc3-1/drivers/net/wireless/intersil/orinoco/main.o' failed

Fixes: 289c6324259e ("mac80211: Update to version 5.7-rc3-1")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agofirewall: add rule for traceroute support
Philip Prindeville [Tue, 28 Apr 2020 00:52:51 +0000 (18:52 -0600)]
firewall: add rule for traceroute support

Running your firewall's "wan" zone in REJECT zone (1) exposes the
presence of the router, (2) depending on the sophistication of
fingerprinting tools might identify the OS and release running on
the firewall which then identifies known vulnerabilities with it
and (3) perhaps most importantly of all, your firewall can be
used in a DDoS reflection attack with spoofed traffic generating
ICMP Unreachables or TCP RST's to overwhelm a victim or saturate
his link.

This rule, when enabled, allows traceroute to work even when the
default input policy of the firewall for the wan zone has been
set to DROP.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
4 years agonetifd: ingress/egress vlan qos mapping support
Hans Dedecker [Thu, 21 May 2020 18:15:29 +0000 (20:15 +0200)]
netifd: ingress/egress vlan qos mapping support

74e0222 vlandev: support setting ingress/egress QoS mappings

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agobcm63xx: WIP: add Huawei HG253s v2 support
Álvaro Fernández Rojas [Wed, 20 May 2020 16:00:23 +0000 (18:00 +0200)]
bcm63xx: WIP: add Huawei HG253s v2 support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm63xx: nand: support CFE partition tags
Álvaro Fernández Rojas [Thu, 21 May 2020 13:04:23 +0000 (15:04 +0200)]
bcm63xx: nand: support CFE partition tags

Introduce support for generating JFFS2 CFE partition tags.
This is used in NAND devices in order to verify the integrity of the JFFS2
partition.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agoscripts: add CFE Partition Tags support
Álvaro Fernández Rojas [Thu, 21 May 2020 13:01:05 +0000 (15:01 +0200)]
scripts: add CFE Partition Tags support

Some BCM63xx NAND devices require a specific JFFS2 partition tag to verify
the JFFS2 partition validity:
u32 part_id;
u32 part_size;
u16 flags;
char part_name[33];
char part_version[21];
u32 part_crc32;

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm63xx: improve rgmii ctrl overrides
Álvaro Fernández Rojas [Thu, 21 May 2020 12:58:36 +0000 (14:58 +0200)]
bcm63xx: improve rgmii ctrl overrides

There are older devices which require overriding the RGMII ports, so this
shouldn't be limited and forced to BCM63268.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm63xx: dgnd3700-v1: add NAND support
Álvaro Fernández Rojas [Thu, 21 May 2020 07:01:45 +0000 (09:01 +0200)]
bcm63xx: dgnd3700-v1: add NAND support

NAND is used as extra storage on this device.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm63xx: nand: fix v2.1 controller support
Álvaro Fernández Rojas [Thu, 21 May 2020 06:58:19 +0000 (08:58 +0200)]
bcm63xx: nand: fix v2.1 controller support

Page size shift is different from v2.2+ controllers

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agomac80211: Update to version 5.7-rc3-1
Hauke Mehrtens [Sun, 19 Apr 2020 22:33:55 +0000 (00:33 +0200)]
mac80211: Update to version 5.7-rc3-1

This updates the mac80211 backport.

The removed patches are already integrated in the upstream version.

The 131-Revert-mac80211-aes-cmac-switch-to-shash-CMAC-driver.patch patch
was manually adapted to the changes in kernel 5.7.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agomac80211: Update to version 5.6.8-1
Hauke Mehrtens [Sat, 18 Apr 2020 21:36:48 +0000 (23:36 +0200)]
mac80211: Update to version 5.6.8-1

This updates the mac80211 backport.

The removed patches are already integrated in the upstream version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agomac80211: Update to version 5.5.19
Hauke Mehrtens [Fri, 13 Mar 2020 13:26:51 +0000 (14:26 +0100)]
mac80211: Update to version 5.5.19

This updates the mac80211 backport.

The removed patches are already integrated in the upstream version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agomac80211: Update to version 5.4.36-1
Hauke Mehrtens [Tue, 28 Apr 2020 21:56:33 +0000 (23:56 +0200)]
mac80211: Update to version 5.4.36-1

This updates the mac80211 backport to the latest minor version.

The removed patch was a backport from the upstream kernel which is now
integrated.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: backport the I2C bus recovery for uDPU
Russell King [Thu, 21 May 2020 08:57:32 +0000 (09:57 +0100)]
kernel: backport the I2C bus recovery for uDPU

Backport the I2C bus recovery DT configuration for the uDPU that has
been queued for 5.8.

Signed-off-by: Russell King <linux@armlinux.org.uk>
4 years agokernel: backport v5.8 i2c-pxa updates
Russell King [Thu, 21 May 2020 08:57:27 +0000 (09:57 +0100)]
kernel: backport v5.8 i2c-pxa updates

Add i2c-pxa updates queued for v5.8, which add bus recovery to this
driver; this is needed for the uDPU platform.

Signed-off-by: Russell King <linux@armlinux.org.uk>
4 years agokernel: backport gpio emulated open drain output fix
Russell King [Thu, 21 May 2020 08:57:22 +0000 (09:57 +0100)]
kernel: backport gpio emulated open drain output fix

Backport the GPIO emulated open drain output fix from v5.5, which is
required for the i2c-pxa backport.

Signed-off-by: Russell King <linux@armlinux.org.uk>
4 years agohostapd: bring back mesh patches
Daniel Golle [Thu, 21 May 2020 09:15:46 +0000 (10:15 +0100)]
hostapd: bring back mesh patches

Bring back 802.11s mesh features to the level previously available
before the recent hostapd version bump. This is mostly to support use
of 802.11s on DFS channels, but also making mesh forwarding
configurable which is crucial for use of 802.11s MAC with other routing
protocols, such as batman-adv, on top.
While at it, fix new compiler warning by adapting 700-wifi-reload.patch
to upstream changes, now building without any warnings again.

Fixes: 0a3ec87a66 ("hostapd: update to latest Git hostap_2_9-1238-gdd2daf0848ed")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agowireguard: bump to 1.0.20200520
Jason A. Donenfeld [Thu, 21 May 2020 04:43:08 +0000 (22:43 -0600)]
wireguard: bump to 1.0.20200520

This version has the various slew of bug fixes and compat fixes and
such, but the most interesting thing from an OpenWRT perspective is that
WireGuard now plays nicely with cake and fq_codel. I'll be very
interested to hear from OpenWRT users whether this makes a measurable
difference. Usual set of full changes follows.

This release aligns with the changes I sent to DaveM for 5.7-rc7 and were
pushed to net.git about 45 minutes ago.

* qemu: use newer iproute2 for gcc-10
* qemu: add -fcommon for compiling ping with gcc-10

These enable the test suite to compile with gcc-10.

* noise: read preshared key while taking lock

Matt noticed a benign data race when porting the Linux code to OpenBSD.

* queueing: preserve flow hash across packet scrubbing
* noise: separate receive counter from send counter

WireGuard now works with fq_codel, cake, and other qdiscs that make use of
skb->hash. This should significantly improve latency spikes related to
buffer bloat. Here's a before and after graph from some data Toke measured:
https://data.zx2c4.com/removal-of-buffer-bloat-in-wireguard.png

* compat: support RHEL 8 as 8.2, drop 8.1 support
* compat: support CentOS 8 explicitly
* compat: RHEL7 backported the skb hash renamings

The usual RHEL churn.

* compat: backport renamed/missing skb hash members

The new support for fq_codel and friends meant more backporting work.

* compat: ip6_dst_lookup_flow was backported to 4.14, 4.9, and 4.4

The main motivation for releasing this now: three stable kernels were released
at the same time, with a patch that necessitated updating in our compat layer.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agohostapd: disable support for Wired Equivalent Privacy by default
Petr Štetiar [Mon, 4 May 2020 08:14:32 +0000 (10:14 +0200)]
hostapd: disable support for Wired Equivalent Privacy by default

Upstream in commit 200c7693c9a1 ("Make WEP functionality an optional
build parameter") has made WEP functionality an optional build parameter
disabled as default, because WEP should not be used for anything
anymore. As a step towards removing it completely, they moved all WEP
related functionality behind CONFIG_WEP blocks and disabled it by
default.

This functionality is subject to be completely removed in a future
release.

So follow this good security advice, deprecation notice and disable WEP
by default, but still allow custom builds with WEP support via
CONFIG_WPA_ENABLE_WEP config option till upstream removes support for
WEP completely.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agohostapd: update to latest Git hostap_2_9-1238-gdd2daf0848ed
Petr Štetiar [Sun, 3 May 2020 13:20:52 +0000 (15:20 +0200)]
hostapd: update to latest Git hostap_2_9-1238-gdd2daf0848ed

Bump package to latest upstream Git HEAD which is commit dd2daf0848ed
("HE: Process HE 6 GHz band capab from associating HE STA"). Since last
update there was 1238 commits done in the upstream tree with 618 files
changed, 53399 insertions, 24928 deletions.

I didn't bothered to rebase mesh patches as the changes seems not
trivial and I don't have enough knowledge of those parts to do/test that
properly, so someone else has to forward port them, ideally upstream
them so we don't need to bother anymore. I've just deleted them for now:

 004-mesh-use-setup-completion-callback-to-complete-mesh-.patch
 005-mesh-update-ssid-frequency-as-pri-sec-channel-switch.patch
 006-mesh-inform-kernel-driver-DFS-handler-in-userspace.patch
 007-mesh-apply-channel-attributes-before-running-Mesh.patch
 011-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
 013-mesh-do-not-allow-pri-sec-channel-switch.patch
 015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch
 016-mesh-fix-channel-switch-error-during-CAC.patch
 018-mesh-make-forwarding-configurable.patch

Refreshed all other patches, removed upstreamed patches:

 051-wpa_supplicant-fix-race-condition-in-mesh-mpm-new-pe.patch
 067-0001-AP-Silently-ignore-management-frame-from-unexpected-.patch
 070-driver_nl80211-fix-WMM-queue-mapping-for-regulatory-.patch
 071-driver_nl80211-fix-regulatory-limits-for-wmm-cwmin-c.patch
 090-wolfssl-fix-crypto_bignum_sum.patch
 091-0001-wolfssl-Fix-compiler-warnings-on-size_t-printf-forma.patch
 091-0002-wolfssl-Fix-crypto_bignum_rand-implementation.patch
 091-0003-wolfssl-Do-not-hardcode-include-directory-in-wpa_sup.patch
 800-usleep.patch

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq8065/NBG6817; ipq40xx/MAP-AC2200]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agofuse: move package to packages feed
Rosen Penev [Sun, 17 May 2020 00:42:58 +0000 (17:42 -0700)]
fuse: move package to packages feed

This package was last updated in 2016. All of the dependent packages
are in the packages feeds, where this will be moved.

Ref: https://github.com/openwrt/packages/pull/12190
Signed-off-by: Rosen Penev <rosenp@gmail.com>
[commit subject/description tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agogeneric: platform/mikrotik: disambiguate SPDX-License-Identifier
Thibaut VARÈNE [Mon, 18 May 2020 11:07:12 +0000 (13:07 +0200)]
generic: platform/mikrotik: disambiguate SPDX-License-Identifier

I meant it to be GPL-2.0-only, as evidenced by the boilerplate.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agogeneric: routerbootpart.c: disambiguate SPDX-License-Identifier
Thibaut VARÈNE [Mon, 18 May 2020 11:07:11 +0000 (13:07 +0200)]
generic: routerbootpart.c: disambiguate SPDX-License-Identifier

I meant it to be GPL-2.0-only, as evidenced by the boilerplate.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agobuild: have config-clean deal with old temp files
Eneas U de Queiroz [Sun, 19 Apr 2020 23:12:52 +0000 (20:12 -0300)]
build: have config-clean deal with old temp files

This is a temporary commit to have 'make config-clean' remove
temporary files from the previous scripts/config version.

The .gitignore file is updated to deal with the old files as well.

Cc: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agobuild: add option to treat recursive deps as error
Eneas U de Queiroz [Sun, 19 Apr 2020 23:12:51 +0000 (20:12 -0300)]
build: add option to treat recursive deps as error

Running make with RECURSIVE_DEP_IS_ERROR=1 will cause a hard failure
when a recursive dependency is detected.  This is useful to apply
stricter Ci tests, for example.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agobuild: scripts/config - update to kconfig-v5.6
Eneas U de Queiroz [Sun, 19 Apr 2020 23:12:50 +0000 (20:12 -0300)]
build: scripts/config - update to kconfig-v5.6

Major changes include:
 - Much more readable reverse dependencies separated in groups
 - Improved recursive dependency report
 - More readable .config files: add comments to signal end of menus
 - More warnings for incorrect Config.in entries, such as a 'choice'
   default not contained in the 'choice'
 - Hability to properly display pseudographics with non-latin locales
 - Recursive dependencies can optionally be treated as errors

Changes from failed dcf3e63a35d05e7e5103819c0f17195bfafe9baa attempt:
 - Recursive dependencies are treated as warnings by default
 - The option to treat them as errors is implemented as a command-line
   flag to scripts/config/conf instead of a compile-time definition
 - fixed handling of select with umnet dependencies

Cc: Petr Štetiar <ynezz@true.cz>
Cc: Jo-Philip Wich <jow@mein.io>
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agosdk: add OpenWrt branding to menuconfig & .config
Eneas U de Queiroz [Sat, 18 Apr 2020 21:49:31 +0000 (18:49 -0300)]
sdk: add OpenWrt branding to menuconfig & .config

Set the mainmenu symbol in SDK Config.in to "OpenWrt Configuration", the
same as the main OpenWrt Config.in.  This string is is used as the name
of the top menu in menuconfig, and at the top of the .config file.  If
unset, current kconfig will use "Linux Kernel Configuration".

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agobuild: show make output in scripts/config when V=s
Eneas U de Queiroz [Fri, 17 Apr 2020 23:57:06 +0000 (20:57 -0300)]
build: show make output in scripts/config when V=s

This should make debugging build errors in scripts/config a bit easier.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agosdk: fix host menu config targets using ncurses
Eneas U de Queiroz [Fri, 17 Apr 2020 16:24:10 +0000 (13:24 -0300)]
sdk: fix host menu config targets using ncurses

This applies 965f341aa9 ("build: fix host menu config targets using
ncurses") to the SDK top Makefile.

If there is a pkg-config in the staging dir, it will try to use it
instead of the host system's pkg-config; then it will fail to find the
ncurses package.  Linux's default will be used, which fails in some
cases, such as recent Gentoo systems.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
[fixed From: to match SoB]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agowolfssl: update to 4.4.0-stable
Eneas U de Queiroz [Fri, 1 May 2020 15:06:48 +0000 (12:06 -0300)]
wolfssl: update to 4.4.0-stable

This version adds many bugfixes, including a couple of security
vulnerabilities:
 - For fast math (enabled by wpa_supplicant option), use a constant time
   modular inverse when mapping to affine when operation involves a
   private key - keygen, calc shared secret, sign.
 - Change constant time and cache resistant ECC mulmod. Ensure points
   being operated on change to make constant time.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agotools: add autoconf-archive
Karel Kočí [Wed, 29 Apr 2020 10:47:58 +0000 (12:47 +0200)]
tools: add autoconf-archive

Some autotools based build systems are using autoconf-archive scripts
and are expecting them to almost always be available. This is not
required for regular releases as tar balls generated for releases
commonly have existing configure script. This is rather intended to be
used with autotools.mk's autoreconf and in cases it is not always
possible to get release tar ball.

Including this adds little to no overhead in terms of build time as
those are just m4 scripts copied to an appropriate location.

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
[fixed From: to match SoB]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agokernel: bump 5.4 to 5.4.42
Petr Štetiar [Wed, 20 May 2020 10:15:27 +0000 (12:15 +0200)]
kernel: bump 5.4 to 5.4.42

Refreshed patches, removed upstreamed patch:

 generic/pending: 001-v5.4-pinctrl-qcom-fix-wrong-write-in-update_dual_edge.patch.patch

Run tested: qemu-x86-64
Build tested: x86/64, ath79/nand, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agokernel: kmod-ptp-qoriq: Package kernel object file
Jeffery To [Tue, 19 May 2020 09:55:34 +0000 (17:55 +0800)]
kernel: kmod-ptp-qoriq: Package kernel object file

This updates the package to contain the kernel object (.ko) file instead
of the plain object (.o) file.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>