openwrt/staging/wigyori.git
3 years agoriscv64: add new port on 5.10 kitchensink-202012
Zoltan HERPAI [Sun, 16 Dec 2018 10:05:58 +0000 (11:05 +0100)]
riscv64: add new port on 5.10

RISC-V is a new CPU architecture aimed to be fully free and open. This
target will add support for it, based on 4.19.

Supports running on:
 - HiFive Unleashed (which is the most known devboard for this arch)
 - QEMU (support is available in mainline qemu)
Further devboards are expected given the interest in this new arch.

An SD-card image is generated, where the partitions are required to have
specific type codes. Compared to earlier branches for this target, BBL
support is removed, giving way for OpenSBI.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agouboot-riscv64: add new package
Zoltan HERPAI [Sun, 26 Jan 2020 22:46:18 +0000 (23:46 +0100)]
uboot-riscv64: add new package

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agofirmware: opensbi: add package for RISC-V
Zoltan HERPAI [Sun, 26 Jan 2020 22:45:48 +0000 (23:45 +0100)]
firmware: opensbi: add package for RISC-V

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agostrace: fix build error on riscv64
Zoltan HERPAI [Wed, 15 May 2019 15:22:31 +0000 (17:22 +0200)]
strace: fix build error on riscv64

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agoopenssl: add linux-riscv64 into the targets list
Zoltan HERPAI [Wed, 15 May 2019 15:21:45 +0000 (17:21 +0200)]
openssl: add linux-riscv64 into the targets list

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agotools: add gptfdisk for riscv64 image generation
Zoltan HERPAI [Mon, 20 Aug 2018 21:07:19 +0000 (23:07 +0200)]
tools: add gptfdisk for riscv64 image generation

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agogeneric: groundwork for RISC-V
Zoltan HERPAI [Sun, 16 Dec 2018 09:45:53 +0000 (10:45 +0100)]
generic: groundwork for RISC-V

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agokernel: add preliminary linux 5.10 support
Felix Fietkau [Sat, 24 Oct 2020 19:14:16 +0000 (21:14 +0200)]
kernel: add preliminary linux 5.10 support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobuild: add option for initramfs zstd compression for newer kernels
Felix Fietkau [Fri, 23 Oct 2020 09:48:11 +0000 (11:48 +0200)]
build: add option for initramfs zstd compression for newer kernels

Preparation for 5.10 support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobuild: build kernel image before building modules/packages
Felix Fietkau [Thu, 22 Oct 2020 08:29:34 +0000 (10:29 +0200)]
build: build kernel image before building modules/packages

This is needed for linux 5.10, where modules.builtin is generated from
vmlinux.o

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobuild: use config.site generated by autoconf-lean, drop hardcoded sitefiles
Felix Fietkau [Fri, 2 Mar 2018 13:17:10 +0000 (14:17 +0100)]
build: use config.site generated by autoconf-lean, drop hardcoded sitefiles

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agotoolchain: add autoconf-lean
Felix Fietkau [Fri, 2 Mar 2018 13:12:18 +0000 (14:12 +0100)]
toolchain: add autoconf-lean

Use it to generate a more comprehensive configure sitefile

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobuild: process variable exports from toplevel.mk only once (fixed)
Felix Fietkau [Tue, 6 Oct 2020 10:37:51 +0000 (12:37 +0200)]
build: process variable exports from toplevel.mk only once (fixed)

These run a lot of expensive shell calls, so redundant calls should be
avoided

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agokirkwood: enable CPUIDLE
Zoltan HERPAI [Thu, 16 Jul 2020 15:47:52 +0000 (17:47 +0200)]
kirkwood: enable CPUIDLE

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agokirkwood: add hwmon-tc654 to Netgear Stora profile
Zoltan HERPAI [Thu, 16 Jul 2020 15:47:34 +0000 (17:47 +0200)]
kirkwood: add hwmon-tc654 to Netgear Stora profile

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agokirkwood: add fan_ctrl script for PWM fan management
Zoltan HERPAI [Thu, 16 Jul 2020 15:47:11 +0000 (17:47 +0200)]
kirkwood: add fan_ctrl script for PWM fan management

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agomodules: add hwmon-tc654
Zoltan HERPAI [Thu, 16 Jul 2020 15:46:44 +0000 (17:46 +0200)]
modules: add hwmon-tc654

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agokirkwood: add support for Netgear Stora (MS2110) NAS
Zoltan HERPAI [Thu, 16 Jul 2020 16:05:53 +0000 (18:05 +0200)]
kirkwood: add support for Netgear Stora (MS2110) NAS

Dual-slot NAS based on Marvell Kirkwood.

Specifications:
 - Marvell 88F6281 @1GHz
 - 128Mb RAM
 - 256Mb NAND
 - 1x GbE LAN (Marvell 88E1116)
 - 1x USB 2.0
 - 2x SATA
 - PCF8563 RTC
 - LM75 sensor
 - TC654 PWM fan controller
 - Serial on J2 (115200,8n1)
 - Newer bootROM so kwboot-ing via serial is possible

Installation:

1. Serial console
 - Connect your levelshifter to the serial console
   on J2 (refer to the wiki page for pinout)
2. Update u-boot
 - Download the u-boot.kwb image for the device
 - Powercycle the NAS
 - Run "kwboot -b ./u-boot.kwb /dev/ttyUSB0 -p"
 - Connect to the serial console with minicom
 - tftp 0x0800000 netgear_stora-u-boot.kwb
 - nand erase 0x0 100000
 - nand write 0x0800000 0x0 0x100000
 - reset
3. Install OpenWrt
 - Boot up the initramfs image
 - tftpboot 0x800000 openwrt-kirkwood-netgear_stora-initramfs-uImage; bootm 0x800000
 - Download the sysupgrade image and perform sysupgrade

Snippets taken from bodhi <mibodhi@gmail.com>

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agomodules: add Allwinner Mali support
Zoltan HERPAI [Mon, 26 Aug 2019 08:24:32 +0000 (10:24 +0200)]
modules: add Allwinner Mali support

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agosunxi: add support for NextThing CHIP with Tzatziffy board
Zoltan HERPAI [Thu, 2 Jul 2020 08:50:31 +0000 (10:50 +0200)]
sunxi: add support for NextThing CHIP with Tzatziffy board

Specifications:
SoC     R8 @ 1Ghz
DRAM    512MiB DDR3-800E @ 360MHz
NAND    4GB
Power   DC 5V @ ~1A, 3.7V Li-Ion battery (Not included)
Storage SD-card via Tzatziffy board

Install method:
Standard sunxi method.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agosunxi: add support for Retro Games Limited C=64 Mini (RGL001)
Zoltan HERPAI [Fri, 24 Apr 2020 13:44:01 +0000 (15:44 +0200)]
sunxi: add support for Retro Games Limited C=64 Mini (RGL001)

CPU: Allwinner A20 dual-core Cortex A7
Memory: 256/512Mb
Storage: 128Mb NAND
USB: 2x USB2.0

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agosunxi: enable NAND on pcDuino3
Zoltan HERPAI [Sun, 25 Aug 2019 20:40:37 +0000 (22:40 +0200)]
sunxi: enable NAND on pcDuino3

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agosunxi: enable NAND support on 5.4
Zoltan HERPAI [Fri, 24 Apr 2020 13:47:52 +0000 (15:47 +0200)]
sunxi: enable NAND support on 5.4

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agosunxi: add support for Banana Pi M3
Zoltan HERPAI [Thu, 5 Mar 2020 20:54:53 +0000 (21:54 +0100)]
sunxi: add support for Banana Pi M3

CPU: Allwinner A83t Octa-core Cortex A7 @ 1.8GHz
Memory: 2GB DDR3
Storage: SDcard, SATA (via USB), 8GB eMMC
Network: 10/100/1000M ethernet, Ampak AP6212 wifi + BT
USB: 2x USB 2.0

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agosunxi: add support for H6 boards and OrangePiOnePlus
Zoltan HERPAI [Fri, 24 Apr 2020 07:58:53 +0000 (09:58 +0200)]
sunxi: add support for H6 boards and OrangePiOnePlus

Specifications:

SoC Allwinner H6 @ 1.8 Ghz
DRAM 1GiB LPDDR3
Power DC 5V @ 3A
Video HDMI (Type 2.0A - full)
Audio HDMI, on-board microphone
Network 10/100/1000Mbps Ethernet (Realtek RTL8211)
Storage microSD
USB 1 USB2.0 Host, 1 USB2.0 OTG
Debug Serial UART

Flashing instructions:
 Standard sunxi SD card installation procedure - copy image to SD card,
 insert in into SD card slot on the device and boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agoarm-trusted-firmware-sunxi: bump to 2.3-1 and start using H6 blobs
Zoltan HERPAI [Wed, 29 Apr 2020 09:07:59 +0000 (11:07 +0200)]
arm-trusted-firmware-sunxi: bump to 2.3-1 and start using H6 blobs

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agoarm-trusted-firmware-sunxi: update install path for A64 blobs
Zoltan HERPAI [Wed, 29 Apr 2020 09:04:00 +0000 (11:04 +0200)]
arm-trusted-firmware-sunxi: update install path for A64 blobs

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agouboot-sunxi: add ATF variable for specifying which flavour to use
Zoltan HERPAI [Wed, 29 Apr 2020 09:02:27 +0000 (11:02 +0200)]
uboot-sunxi: add ATF variable for specifying which flavour to use

In preparation for H6 support (which requires a separate ATF blob), add
an envvar to the A64 boards specifying which ATF blob to use.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agoarm-trusted-firmware-sunxi: bump to v2.3 and use atf-builds binaries
Petr Štetiar [Mon, 20 Apr 2020 08:55:38 +0000 (10:55 +0200)]
arm-trusted-firmware-sunxi: bump to v2.3 and use atf-builds binaries

Update ATF to latest v2.3 release and use reproducible bl31 binaries
from atf-builds project.

atf-builds project started recently offering reproducible ATF binaries
which is more convenient then building very tiny ATF artifacts from
scratch during each build, thus saving considerable build resources.  It
has reduced build from scratch time on my CI builder for sunxi/cortexa53
target from 57min down to 29min.

Run tested on a64-olinuxino-emmc.

 U-Boot SPL 2020.04 (Apr 20 2020 - 08:28:05 +0000)
 DRAM: 1024 MiB
 Trying to boot from MMC1
 NOTICE:  BL31: v2.2():v2.3-rc1
 NOTICE:  BL31: Built : 19:20:57, Apr 15 2020
 NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
 NOTICE:  BL31: Found U-Boot DTB at 0x4090dc0, model: Olimex A64-Olinuxino-eMMC

Cc: Zoltan HERPAI <wigyori@uid0.hu>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Petr Å tetiar <ynezz@true.cz>
3 years agosuniv: add new target
Zoltan HERPAI [Wed, 13 Mar 2019 23:24:50 +0000 (00:24 +0100)]
suniv: add new target

This is Allwinner's ARM926EJ-S core, which is one of its early
products, reappearing in recent compact designs. The SoC includes
32Mb memory integrated, and has display and USB interfaces,
allowing for small footprint boards.

The target consists of basic 5.4 support, without u-boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agoshmin: add new SH3-target
Zoltan HERPAI [Mon, 26 Aug 2019 15:04:33 +0000 (17:04 +0200)]
shmin: add new SH3-target

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agosh775x: add new SH4 target
Zoltan HERPAI [Mon, 26 Aug 2019 14:37:31 +0000 (16:37 +0200)]
sh775x: add new SH4 target

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agobase-files: upgrade: fix initramfs detection
Robert Marko [Sun, 20 Dec 2020 17:02:53 +0000 (18:02 +0100)]
base-files: upgrade: fix initramfs detection

Commit "initramfs: switch to tmpfs to fix ujail" switched initramfs to
now use tmpfs, it causes $(rootfs_type) to now return tmpfs when
running initramfs image instead of being empty.

This broke initramfs detection which prevents config files from
being saved as it does not work from initramfs.

So, lets test for $(rootfs_type) returning "tmpfs" instead.

Fixes: 7fd3c68 ("initramfs: switch to tmpfs to fix ujail)
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 years agotreewide: fix initramfs detection
Robert Marko [Sun, 20 Dec 2020 17:02:54 +0000 (18:02 +0100)]
treewide: fix initramfs detection

Commit "initramfs: switch to tmpfs to fix ujail" switched initramfs to
now use tmpfs, it causes $(rootfs_type) to now return tmpfs when
running initramfs image instead of being empty.

This broke initramfs detection which is required so that when installing
on MikroTik devices firmware partition would first get erased fully
before writing.

So, lets test for $(rootfs_type) returning "tmpfs" instead.

Fixes: 7fd3c68 ("initramfs: switch to tmpfs to fix ujail)
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 years agouhttpd: don't redirect to HTTPS by default
Petr Štetiar [Mon, 14 Dec 2020 07:46:36 +0000 (08:46 +0100)]
uhttpd: don't redirect to HTTPS by default

So we can ship px5g-wolfssl by default in the release image, but still
make the HTTPS for LuCI optional. This small change with addition of
`CONFIG_PACKAGE_px5g-wolfssl=y` into the buildbot's seed config for the
next release should provide optional HTTPS in the next release.

Disabling the current default automatic uhttpd's redirect to HTTPS
should make the HTTPS optional. That's it, user would either need to
switch to HTTPS by manually switching to https:// protocol in the URL or
by issuing the following commands to make the HTTPS automatic redirect
permanent:

 $ uci set uhttpd.main.redirect_https=1
 $ uci commit uhttpd
 $ service uhttpd reload

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agomvebu: macchiatobin-singleshot: enable heartbeat LED
Tomasz Maciej Nowak [Fri, 18 Dec 2020 14:46:21 +0000 (15:46 +0100)]
mvebu: macchiatobin-singleshot: enable heartbeat LED

With board revision 1.3, SolidRun moved the power LED to the middle of
the board. In old place of power LED a GPIO controllable heartbeat LED
was added. This commit touches only Single Shot variant, because all
have revision 1.3. Some boards could be placed in an enclosure, therefore
the LED18 is enabled by default, since that'll be the only visible
indicator that the board is operating.

Ref: http://wiki.macchiatobin.net/tiki-index.php?page=Schematics#Revision1.3_Electrical_Design_Changes
Ref: http://macchiatobin.net/wp-content/uploads/2017/11/MACCHIATOBin-rev-1_3.pdf

Reported-by: Alexandra Alth <alexandra@alth.de>
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
3 years agomt76: Fix compile against glibc
Hauke Mehrtens [Thu, 17 Dec 2020 12:58:01 +0000 (13:58 +0100)]
mt76: Fix compile against glibc

The mt76 test tools did not compile against glibc.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agotoolchain: Deactivate sanitizer on MIPS and ARC
Hauke Mehrtens [Thu, 17 Dec 2020 11:51:26 +0000 (12:51 +0100)]
toolchain: Deactivate sanitizer on MIPS and ARC

MIPS 32 bit support for sanitizer was added with GCC 9, MIPS 64 bit and
ARC are still not supported in GCC 10.

Deactivate them for now and change this when we change the default
compiler to GCC 9 or later.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agoath79: airtight c-75: use second flash chip
Tomasz Maciej Nowak [Thu, 17 Dec 2020 16:24:27 +0000 (17:24 +0100)]
ath79: airtight c-75: use second flash chip

The flash capacity is divided in two flash chips and currently only
first is used. Increase available space for OpenWrt by additional 16 MiB
using mtd-concat driver. Because U-Boot might not be able to load kernel
image spanned through two flash chips, the size of kernel is limited
to space available on first first chip.

Cc: Vladimir Georgievsky <vladimir.georgievsky@yahoo.com>
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
3 years agoath79: add support for AirTight C-75
Tomasz Maciej Nowak [Thu, 17 Dec 2020 16:24:26 +0000 (17:24 +0100)]
ath79: add support for AirTight C-75

AirTight Networks (later renamed to Mojo Networks) C-75 is a dual-band
access point, also sold by WatchGuard under name AP320.

Specification
SoC: Qualcomm Atheros QCA9550
RAM: 128 MiB DDR2
Flash: 2x 16 MiB SPI NOR
WIFI: 2.4 GHz 3T3R integrated
      5 GHz 3T3R QCA9890 oversized Mini PCIe card
Ethernet: 2x 10/100/1000 Mbps QCA8334
          port labeled LAN1 is PoE capable (802.3at)
USB: 1x 2.0
LEDs: 7x which two are GPIO controlled, four switch controlled, one
      controlled by wireless driver
Buttons: 1x GPIO controlled
Serial: RJ-45 port, Cisco pinout
        baud: 115200, parity: none, flow control: none
JTAG: Yes, pins marked J1 on PCB

Installation
1. Prepare TFTP server with OpenWrt initramfs-kernel image.
2. Connect to one of LAN ports.
3. Connect to serial port.
4. Power on the device and when prompted to stop autoboot, hit any key.
5. Adjust "ipaddr" and "serverip" addresses in U-Boot environment, use
   'setenv' to do that, then run following commands:
    tftpboot 0x81000000 <openwrt_initramfs-kernel_image_name>
    bootm 0x81000000
6. Wait about 1 minute for OpenWrt to boot.
7. Transfer OpenWrt sysupgrade image to /tmp directory and flash it
   with:
    sysupgrade -n /tmp/<openwrt_sysupgrade_image_name>
8. After flashing, the access point will reboot to OpenWrt. Wait few
   minutes, until the Power LED stops blinking, then it's ready for
   configuration.

Known issues
Green power LED does not work.

Additional information
The U-Boot fails to initialise ethernet ports correctly when a UART
adapter is attached to UART pins (marked J3 on PCB).

Cc: Vladimir Georgievsky <vladimir.georgievsky@yahoo.com>
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
3 years agobcm53xx: use correct case for TP-Link in DEVICE_VENDOR
Moritz Warning [Sat, 19 Dec 2020 16:43:52 +0000 (17:43 +0100)]
bcm53xx: use correct case for TP-Link in DEVICE_VENDOR

Adjust spelling of vendor names to what is used in other places.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
[improve commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoipq40xx: use upper case for NETGEAR in DEVICE_VENDOR
Moritz Warning [Sat, 19 Dec 2020 16:43:24 +0000 (17:43 +0100)]
ipq40xx: use upper case for NETGEAR in DEVICE_VENDOR

Adjust spelling of vendor name to what is used in other places.

Also move definition in shared section.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
[improve commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agolantiq: xrx200: remove redundant stp parameters
Aleksander Jan Bajkowski [Tue, 8 Dec 2020 17:41:42 +0000 (18:41 +0100)]
lantiq: xrx200: remove redundant stp parameters

These parameters are the same as in vr9.dtsi. This patch removes
redundant parameters.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
3 years agomac80211: do not drop tx nulldata packets on encrypted links
Felix Fietkau [Fri, 18 Dec 2020 21:58:10 +0000 (22:58 +0100)]
mac80211: do not drop tx nulldata packets on encrypted links

Fixes sending out nulldata probing frames

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agotools/libressl: update to 3.3.1
Rosen Penev [Fri, 18 Dec 2020 01:46:40 +0000 (17:46 -0800)]
tools/libressl: update to 3.3.1

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agomt76: update to the latest version
Felix Fietkau [Fri, 18 Dec 2020 17:23:52 +0000 (18:23 +0100)]
mt76: update to the latest version

7f53d68b1af9 mt76: mt7615: add debugfs knob for setting extended local mac addresses
1a2547b27dfc mt76: do not set NEEDS_UNIQUE_STA_ADDR for 7615 and 7915
2741fd071bb7 mt76: mt7915: support 32 station interfaces
709f2cd77810 mt76: mt7915: fix processing txfree events
434940e08233 mt76: mt7915: measure channel noise and report it via survey
236326896589 mt76: mt7615: retry if mt7615_mcu_init returns -EAGAIN
b5c593b63f4c mt76: mt7663s: move tx/rx processing in the same txrx workqueue
75157b59ae4e mt76: mt7663s: convert txrx_work to mt76_worker
6dc67b058e2a mt76: mt7663s: disable interrupt during txrx_worker processing
b381729626bb mt76: sdio: convert {status/net}_work to mt76_worker
9cb12f7042cc mt76: mt7915: fix DRR sta bss group index
75977a85e844 mt76: mt7915: disable OFDMA/MU-MIMO UL
6cdebe805862 mt76: rename __mt76_mcu_send_msg to mt76_mcu_send_msg
eb9afae96b65 mt76: rename __mt76_mcu_skb_send_msg to mt76_mcu_skb_send_msg
8c73f3b15ada mt76: implement .mcu_parse_response in struct mt76_mcu_ops
fcfbb046c2f3 mt76: move mcu timeout handling to .mcu_parse_response
477caa196ffe mt76: move waiting and locking out of mcu_ops->mcu_skb_send_msg
a4d71501bad6 mt76: make mcu_ops->mcu_send_msg optional
80c310c59ad1 mt76: mt7603: switch to .mcu_skb_send_msg
082b26181013 mt76: implement functions to get the response skb for MCU calls
ee40800df2e4 mt76: mt7915: move eeprom parsing out of mt7915_mcu_parse_response
d33943baac47 mt76: mt7915: query station rx rate from firmware
b8874e8756d9 mt76: add back the SUPPORTS_REORDERING_BUFFER flag
633ae5961db6 mt76: mt7615: enable beacon filtering by default for offload fw
9a203fea3540 mt76: mt7615: introduce quota debugfs node for mt7663s
f9ae638af7e2 mt76: mt7663s: get rid of mt7663s_sta_add
1a5758d894d0 mt76: mt7663s: fix a possible ple quota underflow
dea10c03316f mt76: sdio: get rid of sched.lock
eb4c09957938 mt76: mt7915: set fops_sta_stats.owner to THIS_MODULE
594890b11155 mt76: mt7915: update ppe threshold
8884a5def518 mt76: mt7915: rename mt7915_mcu_get_rate_info to mt7915_mcu_get_tx_rate
33b89f4a1bf4 mt76: set fops_tx_stats.owner to THIS_MODULE
4d019c9672ec sync with upstream changes
35e3cd1db479 mt76: mt7603: fix ED/CCA monitoring with single-stream devices
4f9f79b085b1 wireless: mt76: convert tasklets to use new tasklet_setup() API
20e8cf935ed0 mt76: dma: fix possible deadlock running mt76_dma_cleanup
36089a655f58 mt76: mt7915: fix sparse warning cast from restricted __le16
68c4eedafd61 mt76: fix memory leak if device probing fails
9a1a0a4dec71 mt76: mt7603: add additional EEPROM chip ID
01b943295719 mt76: move mt76_mcu_send_firmware in common module
0aee4999902a mt76: mt7663s: introduce WoW support via GPIO
79ebad117325 mt76: switch to wep sw crypto for mt7615/mt7915
af139725193a mt76: fix tkip configuration for mt7615/7663 devices
664e66b35c0b mt76: mt7615: run key configuration in mt7615_set_key for usb/sdio devices
f675358267d6 mt76: mt76u: rely on woker APIs for rx work
b9f9c16cb1bd mt76: mt76u: use dedicated thread for status work
cdeb1b29cd15 mt76: testmode: switch ib and wb rssi to array type for per-antenna report
0a898c0549b6 mt76: testmode: add snr attribute in rx statistics
3ea9a0433bcc mt76: testmode: add tx_rate_stbc parameter
73427ebbbd27 mt76: testmode: add support for LTF and GI combinations for HE mode
88ebccfe8a39 mt76: mt7915: fix tx rate related fields in tx descriptor
9909c0551e4c mt76: testmode: add support for HE rate modes
03ed0909f922 mt76: mt7915: implement testmode tx support
0aa696834a9c mt76: mt7915: implement testmode rx support
5ed3a34b46ce mt76: mt7915: add support to set txpower in testmode
f86361654e94 mt76: mt7915: add support to set tx frequency offset in testmode
64a765be750a mt76: mt7915: make mt7915_eeprom_read static
9b48c13b52f7 mt76: mt7915: use BIT_ULL for omac_idx
27227fd57ea7 mt76: mt7915: remove unused mt7915_mcu_bss_sync_tlv()
cd795267612d mt76: mt7615: support 16 interfaces
82da525ad0c8 mt76: mt7615: refactor usb/sdio rate code
b9a50da503ad mt76: mt7915: rely on eeprom definitions
c79d18723df0 mt76: move mt76_init_tx_queue in common code
b0b221e91445 mt76: sdio: introduce mt76s_alloc_tx_queue
caba5a99e5ae mt76: sdio: rely on mt76_queue in mt76s_process_tx_queue signature
3ed4aad81ce9 mt76: mt7663s: rely on mt76_queue in mt7663s_tx_run_queue signature
216cf8b28579 mt76: dma: rely on mt76_queue in mt76_dma_tx_cleanup signature
0f9350bef1b5 mt76: rely on mt76_queue in tx_queue_skb signature
8932975be066 mt76: introduce mt76_init_mcu_queue utility routine
b0eb7edcc624 mt76: rely on mt76_queue in tx_queue_skb_raw signature
ccd62467d0f3 mt76: move mcu queues to mt76_dev q_mcu array
2e217fb9e962 mt76: move tx hw data queues in mt76_phy
576647f2ec6a mt76: mt7915: fix endian issues
e881fd67c718 mt76: move band capabilities in mt76_phy
c728cecd7b77 mt76: rely on mt76_phy in mt76_init_sband_2g and mt76_init_sband_5g
231ef27697f9 mt76: move band allocation in mt76_register_phy
8aa24c91b13b mt76: move hw mac_addr in mt76_phy
b436da4d9d92 mt76: mt7915: introduce dbdc support
1e34a02c2dcb mt76: mt7915: get rid of dbdc debugfs knob
d8e681bd3268 mt76: mt7615: fix rdd mcu cmd endianness
19c9e277eff6 mt76: mt7915: fix memory leak in mt7915_mcu_get_rx_rate()
e361b6a71e4b mt76: improve tx queue stop/wake
fb24e5f2305b mt76: mt7915: stop queues when running out of tx tokens
066cc441eb8f mt76: attempt to free up more room when filling the tx queue
93c806a34ec2 mt7915: fix minor issues in the token queue blocking change
c017e329a326 mt76: mt7915: ensure that init work completes before starting the device
9e9da427b8a6 mt76: mt7915: fix polling firmware-own status
5cd805ddfb25 mt76: add more conditions for stopping tx scheduling
aa893c73bf85 mt76: mt7915; increase txq memory limit for non-DBDC 7915 cards to 32 MiB
e44b7c91070e mt76: skip queue stop/wake, rely entirely on txq scheduling
6c6a5c59c101 mt76: mt7915: do not set DRR group for stations
510cb5be1bf7 mt76: usb: remove wake logic in mt76u_status_worker
34f318a25421 mt76: sdio: remove wake logic in mt76s_process_tx_queue
4a90fdf6105e mt76: mt76s: fix NULL pointer dereference in mt76s_process_tx_queue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agokernel: improve skb hash on the mtk ethernet driver
Felix Fietkau [Fri, 18 Dec 2020 16:10:04 +0000 (17:10 +0100)]
kernel: improve skb hash on the mtk ethernet driver

The PPE only provides a 14 bit hash, however many uses of the skb hash
expect the hash to use the full 32 bit range.
Use jhash to extend the hash to the full size

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agonat46: Fix PKG_MIRROR_HASH
Hauke Mehrtens [Thu, 17 Dec 2020 11:02:53 +0000 (12:02 +0100)]
nat46: Fix PKG_MIRROR_HASH

The PKG_MIRROR_HASH was not updated when updating the package.

Fixes: f75c70aecaca ("nat46: update to latest git HEAD")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agoramips: do not enable unused GPIO controllers
Adrian Schmutzler [Tue, 1 Dec 2020 14:07:58 +0000 (15:07 +0100)]
ramips: do not enable unused GPIO controllers

Several devices enable GPIO controllers not used in the DTS files.

Drop them.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: qca955x: remove redundant phy-mode
Adrian Schmutzler [Wed, 16 Dec 2020 16:01:02 +0000 (17:01 +0100)]
ath79: qca955x: remove redundant phy-mode

phy-mode is already set to rgmii for eth0 and sgmii for eth1 in
qca955x.dtsi, no need to do that again in the device DTS files.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add support for GL.iNet GL-MT1300
Xinfa Deng [Wed, 16 Dec 2020 07:58:28 +0000 (15:58 +0800)]
ramips: add support for GL.iNet GL-MT1300

The GL-MT1300 is a high-performance new generation pocket-sized router
that offers a powerful hardware and first-class cybersecurity protocol
with unique and modern design.

Specifications:
- SoC: MT7621A, Dual-Core @880MHz
- RAM: 256 MB DDR3
- Flash: 32 MB
- Ethernet: 3 x 10/100/1000: 2 x LAN + 1 x WAN
- Wireless: 1 x MT7615D Dual-Band 2.4GHz(400Mbps) + 5GHz(867Mbps)
- USB: 1 x USB 3.0 port
- Slot: 1 x MicroSD card slot
- Button: 1 x Reset button
- Switch: 1 x Mode switch
- LED: 1 x Blue LED + 1 x White LED

MAC addresses based on vendor firmware:
WAN : factory 0x4000
LAN : Mac from factory 0x4000 + 1
2.4GHz : factory 0x4
5GHz : Mac form factory 0x4 + 1

Flashing instructions:
1.Connect to one of LAN ports.
2.Set the static IP on the PC to 192.168.1.2.
3.Press the Reset button and power the device (do not release the button).
  After waiting for the blue led to flash 5 times, the white led will
  come on and release the button.
4.Browse the 192.168.1.1 web page and update firmware according to web
  tips.
5.The blue led will flash when the firmware is being upgraded.
6.The blue led stops blinking to indicate that the firmware upgrade is
  complete and U-Boot automatically starts the firmware.

For more information on GL-MT1300, see the OFFICIAL GL.iNet website:
https://www.gl-inet.com/products/gl-mt1300/

Signed-off-by: Xinfa Deng <xinfa.deng@gl-inet.com>
[add input-type for switch, wrap long line in 10_fix_wifi_mac]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agolantiq: falcon: mark as source only sub target
Hauke Mehrtens [Wed, 16 Dec 2020 20:03:01 +0000 (21:03 +0100)]
lantiq: falcon: mark as source only sub target

The sub target does not support network and there are not so many users
out there, just mark it as source only, so we do jot have to build it.

The quality is not worse than before, it just does not make much sense
to build this automatically.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agowireless-regdb: Update to version 2020.11.20
Hauke Mehrtens [Wed, 16 Dec 2020 16:23:59 +0000 (17:23 +0100)]
wireless-regdb: Update to version 2020.11.20

9efa1da wireless-regdb: update regulatory rules for Egypt (EG)
ede87f5 wireless-regdb: restore channel 12 & 13 limitation in the US
5bcafa3 wireless-regdb: Update regulatory rules for Croatia (HR)
4e052f1 wireless-regdb: Update regulatory rules for Pakistan (PK) on 5GHz
f9dfc58 wireless-regdb: update 5.8 GHz regulatory rule for GB
c19aad0 wireless-regdb: Update regulatory rules for Kazakhstan (KZ)
07057d3 wireless-regdb: update regulatory database based on preceding changes

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agobuild: Add IRQSOFF and PREEMPT TRACER kernel config option
Hauke Mehrtens [Thu, 3 Dec 2020 17:49:12 +0000 (18:49 +0100)]
build: Add IRQSOFF and PREEMPT TRACER kernel config option

This adds the CONFIG_IRQSOFF_TRACER and the CONFIG_PREEMPT_TRACER kernel
configuration option to the OpenWrt menu. This can be used to debug
latencies in the system.
The CONFIG_PREEMPT_TRACER option needs the CONFIG_PREEMPT option which is
supposed to be used for Low-Latency Desktop and not used by many targets
in OpenWrt.

The help text is copied from the Linux kernel Kconfig.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
3 years agoutil-linux: update to 2.36.1
Rosen Penev [Wed, 9 Dec 2020 01:21:40 +0000 (17:21 -0800)]
util-linux: update to 2.36.1

Removed upstream patch.

Refreshed other ones.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agolibunwind: update to 1.5.0
Rosen Penev [Wed, 9 Dec 2020 01:56:59 +0000 (17:56 -0800)]
libunwind: update to 1.5.0

Cleanup Makefile for consistency with other ones.

Remove PKG_SSP. It can be fixed with -lssp_nonshared.

Add PKG_BUILD_PARALLEL for faster compilation.

Add zlib dependency. 1.5.0 requires it now.

Refresh patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agomac80211: Update to version 5.8.18-1
Hauke Mehrtens [Mon, 30 Nov 2020 23:10:23 +0000 (00:10 +0100)]
mac80211: Update to version 5.8.18-1

The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agoe2fsprogs: Add TARGET_LDFLAGS to e4crypt
Hauke Mehrtens [Tue, 15 Dec 2020 21:23:50 +0000 (22:23 +0100)]
e2fsprogs: Add TARGET_LDFLAGS to e4crypt

The TARGET_LDFLAGS were dropped in the linking of e4crypt.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agotoolchain: gcc: Remove support for GCC 5
Hauke Mehrtens [Tue, 15 Dec 2020 12:56:46 +0000 (13:56 +0100)]
toolchain: gcc: Remove support for GCC 5

GCC was used in 17.01 as the default compiler the last time. We do not
test this old GCC version any more and there are some known problems it
fails to compile the U-Boot for the Allwinner A64 SoC.

Just remove it to make it clear that we will not support this old GCC
version any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Paul Spooren <mail@aparcar.org>
3 years agotools/cmake: update to 3.19.1
Hannu Nyman [Mon, 14 Dec 2020 20:00:21 +0000 (22:00 +0200)]
tools/cmake: update to 3.19.1

Update cmake to version 3.19.1

Release notes: https://cmake.org/cmake/help/v3.19/release/3.19.html

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agokernel: bump 5.4 to 5.4.83
John Audia [Fri, 11 Dec 2020 15:34:41 +0000 (10:34 -0500)]
kernel: bump 5.4 to 5.4.83

Manually merged:
  layerscape/808-i2c-0011-i2c-imx-support-slave-mode-for-imx-I2C-driver.patch
  layerscape/808-i2c-0012-i2c-imx-correct-code-of-errata-A-010650-for-layersca.patch

Remaining modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711, x86/64 [*],
              ramips/mt7621 [*], ath79/tiny [*], ipq40xx [*], octeon [*],
              realtek [*]
Run-tested: ipq806x/R7800, ramips/mt7621 [*], octeon [*], realtek [*]

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org> [*]
3 years agolibnetfilter-conntrack: update to 1.0.8
Rosen Penev [Mon, 9 Nov 2020 07:09:22 +0000 (23:09 -0800)]
libnetfilter-conntrack: update to 1.0.8

Previous git version was 1.0.7.

Switched to using tarballs for simplicity.

Fixed license information.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agoarmvirt: README: rename it from LEDE to OpenWrt
Josef Schlehofer [Sun, 13 Dec 2020 14:02:37 +0000 (15:02 +0100)]
armvirt: README: rename it from LEDE to OpenWrt

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
3 years agoarmvirt/64: change it to cortex-a53 instead of generic
Josef Schlehofer [Sun, 13 Dec 2020 14:02:36 +0000 (15:02 +0100)]
armvirt/64: change it to cortex-a53 instead of generic

Package architecture aarch64_generic [1] can be used just with three
devices. One is NanoPI R2S and then there are two development boards
from NXP. Let's change armvirt/64 to Cortex A53 (aarch64_cortex-a53)
[2]. It has wider support by multiple devices like NanoPI Neo Plus2/Core2,
ESPRESSObin, Pine64, and Raspberry Pi 2&3.

While looking at ARMvirt/32 it has set CPU_TYPE and CPU_SUBTYPE to be
arm_cortex-a15_neon-vfpv4 [3]. It has support to devices like
Linksys EA8500 v1, Linksys EA7500 v1, Netgear D7800, Netgear R7500 and so on.

Tested with:
qemu-system-aarch64 -m 1024 -smp 2 -cpu cortex-a57 -M virt -nographic \
-kernel openwrt-armvirt-64-Image-initramfs

Successfully compiled and booted.
Here goes the output:
root@OpenWrt:/# uname -a
Linux OpenWrt 5.4.82 #0 SMP Sun Dec 13 12:52:10 2020 aarch64 GNU/Linux
root@OpenWrt:/# cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_REVISION='r15207-96fca0f807'
DISTRIB_TARGET='armvirt/64'
DISTRIB_ARCH='aarch64_cortex-a53'
DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r15207-96fca0f807'
DISTRIB_TAINTS='no-all'

Also, change BOARDNAME to be the same as it is in armvirt/32.

[1] https://openwrt.org/docs/techref/instructionset/aarch64_generic
[2] https://openwrt.org/docs/techref/instructionset/aarch64_cortex-a53
[3] https://openwrt.org/docs/techref/instructionset/arm_cortex-a15_neon-vfpv4

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
3 years agonetifd: update to latest version
Nick Hainke [Sun, 13 Dec 2020 17:36:04 +0000 (18:36 +0100)]
netifd: update to latest version

458b1a7e9473 netifd: add segment routing support

Signed-off-by: Nick Hainke <vincent@systemli.org>
3 years agokernel: enable kernel keyring by default on !SMALL_FLASH
Daniel Golle [Wed, 9 Dec 2020 12:45:55 +0000 (12:45 +0000)]
kernel: enable kernel keyring by default on !SMALL_FLASH

Enable CONFIG_KEYS by default on systems which are not marked as
flash-space constraint by the 'small_flash' feature.
CONFIG_KEYS is required by Docker, enabling it in our kernel allows
users to run Docker on stock OpenWrt.
It is also used of by some network file systems (such as NFSv4) to
store credentials as well as UID/GID mappings.

Adds about 50kB to vmlinux on ath79/generic (~18kB compressed)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: package kmod-keys-encrypted and kmod-keys-trusted
Daniel Golle [Wed, 9 Dec 2020 12:43:57 +0000 (12:43 +0000)]
kernel: package kmod-keys-encrypted and kmod-keys-trusted

Add kernel module packages for handling encrypted and TPM trusted
keys on the kernel chain.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: update and clean kernel keyring options
Daniel Golle [Wed, 9 Dec 2020 12:28:31 +0000 (12:28 +0000)]
kernel: update and clean kernel keyring options

Add KERNEL_KEYS_REQUEST_CACHE option.
'tristate' (ie. module builds) are not valid in Config-kernel.in, hence
remove tristate KERNEL_ENCRYPTED_KEYS. It will be readded as a kernel
module in a follow-up commit.

Fixes: 39d817cf38 ("Add config symbols for kernel keyring support")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agolantiq: xrx200: remove unused lan/wan labels from dts
Aleksander Jan Bajkowski [Sat, 12 Dec 2020 15:28:39 +0000 (16:28 +0100)]
lantiq: xrx200: remove unused lan/wan labels from dts

These labels are not used anywhere and can be removed.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
3 years agoath79: add support for the Belkin F9K1115 v2 (AC1750 DB Wi-Fi)
Martin Blumenstingl [Sat, 28 Nov 2020 11:08:42 +0000 (12:08 +0100)]
ath79: add support for the Belkin F9K1115 v2 (AC1750 DB Wi-Fi)

This device has (almost?) identical hardware to the F9J1108 v2 but uses
a different firmware magic and model number.

Specifications:

SoC: QCA9558
CPU: 720 MHz
Flash: 16 MiB NOR
RAM: 128 MiB
WiFi 2.4 GHz: QCA9558-AT4A 3x3 MIMO 802.11b/g/n
WiFi 5 GHz: QCA9880-2R4E 3x3 MIMO 802.11a/n/ac
Ethernet: 4x LAN and 1x WAN (all 1Gbit/s ports)
USB: 1 x USB 2.0 (lower), 1 x USB 3.0 (upper)

MAC addresses based on OEM firmware:

Interface   Address   Location
---------   -------   --------
lan         *:5A      sometimes in 0x6
wan         *:5B      0x0
2.4Ghz      *:5A      0x1002
5Ghz        As per mini PCIe EEPROM

Flashing instructions:

The factory.bin can be flashed via the Belkin web UI or via the uboot
HTTP upgrade page (which is by default listening on 192.168.2.1). Once
the factory.bin has been written, sysupgrade.bin will work as usual.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
3 years agoath79: create shared DTSI/definition for Belkin F9J1108/F9K1115 v2
Martin Blumenstingl [Sat, 28 Nov 2020 11:04:00 +0000 (12:04 +0100)]
ath79: create shared DTSI/definition for Belkin F9J1108/F9K1115 v2

Belkin F9J1108 v2 and F9K1115 v2 are (seemingly) identical hardware
with different model numbers. Extract all non-device specific code to a
common .dtsi so it can be re-used when adding support for the
F9K1115 v2.

Similar to the .dtsi most of the image building recipe code can be
re-used. Move everything except the device model, edimax header magic
and edimax header model into a shared build recipe.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
[drop duplicate TARGET_DEVICES, add EDIMAX_* to DEVICE_VARS, edit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agotplink-safeloader: add support for TP-Link CPE510 v3.20
Gioacchino Mazzurco [Mon, 14 Dec 2020 09:48:43 +0000 (10:48 +0100)]
tplink-safeloader: add support for TP-Link CPE510 v3.20

This adds new strings for the v3.20 to the support list of the
already supported TP-Link CPE510 v3.

The underlying hardware appears to be the same, similar to the
situation with CPE210 v3.20 in 4a2380a1e778 ("tplink-safeloader:
expand support list for TP-Link CPE210 v3")

Signed-off-by: Gioacchino Mazzurco <gio@altermundi.net>
[extended commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agouclient: update to Git version 2020-12-10
Petr Štetiar [Thu, 10 Dec 2020 14:31:26 +0000 (15:31 +0100)]
uclient: update to Git version 2020-12-10

2c843b2bc04c Add initial GitLab CI support
073f89f567c0 uclient-fetch: wolfSSL: fix certificate validation
086c292160ac uclient-fetch: init_ca_cert: fix memory leak
a3c1a88b031a cmake: enable extra compiler checks
32ff717ed316 uclient-http: fix extra compiler warnings on mips_24kc and cortex-a9+neon
86a2ac6ac46f uclient-fetch: fix potential memory leaks
158dd9dd289c uclient: fix initialized but never read variable
66b4420856a7 uclient-fetch: fix statement may fallt hrough
436f9b3af2ad uclient-http: fix freeing of stack allocated memory
e6b5b8a98ce2 Fix extra compiler warnings
12df67e45bb0 Add basic cram based unit tests
b6e34845124f cmake: fix building out of the tree

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agoustream-ssl: update to Git version 2020-12-10
Petr Štetiar [Thu, 10 Dec 2020 14:29:12 +0000 (15:29 +0100)]
ustream-ssl: update to Git version 2020-12-10

68d09243b6fd Add initial GitLab CI support
8280140db9d1 wolfssl: remove now deprecated compatibility code
cee6791b362a ustream-mbedtls: fix certificate verification
55c3fd89d508 ustream-mbedtls: implement set_require_validation
c6b4c48689a3 ustream-openssl: wolfSSL: fix certificate validation
3bc05402bfab cmake: enable extra compiler checks
cd2c3d12db43 ustream-mbedtls: fix comparison of integers of different signs
5896991e46a3 ustream-openssl: fix BIO_method memory leak
2c342ae57c5b ustream-openssl: fix wolfSSL includes
fa8ecd6ed140 cmake: fix linking when mbed TLS not in default paths
63656f81045f cmake: fix linking when wolfSSL not in default paths
c26f71e844df cmake: fix building out of the tree

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agobuild/json: add filesystem information
Paul Spooren [Mon, 14 Dec 2020 00:36:17 +0000 (14:36 -1000)]
build/json: add filesystem information

Some images are created using different filesystems, most popular
squashfs and ext4. To allow downstream projects to distinguesh between
those, add the `filesystem` information to created json files.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoipq40xx: revert usage of VLAN S-TAG
David Bauer [Tue, 1 Dec 2020 17:55:27 +0000 (18:55 +0100)]
ipq40xx: revert usage of VLAN S-TAG

This reverts the usage of the S-Tag for separating LAN and WAN port on
the embedded switch. Many users complained about not being able to
manage C-Tag addition / removal on the switch as well as degraded
performance.

Fixes: commit 9da2b567605b ("ipq40xx: fix ethernet vlan double tagging")
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agozram-swap: remove the compression streams settings
Rui Salvaterra [Mon, 19 Oct 2020 18:21:13 +0000 (19:21 +0100)]
zram-swap: remove the compression streams settings

Zram switched to per-cpu compression streams since Linux 4.7 [1]. Drop the
irrelevant configuration (no-op).

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/block/zram?h=v4.7&id=43209ea2d17aae1540d4e28274e36404f72702f2

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agobcm53xx: MR32: fix DEVICE_VENODR typo
Christian Lamparter [Sun, 13 Dec 2020 15:14:35 +0000 (16:14 +0100)]
bcm53xx: MR32: fix DEVICE_VENODR typo

DEVICE_VENDOR was misspelled as DEVICE_VENODR.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
3 years agoipq40xx: fix 5Ghz tx/rx power on the ASUS MAP-AC2200
Yushi Nishida [Fri, 27 Nov 2020 20:54:22 +0000 (21:54 +0100)]
ipq40xx: fix 5Ghz tx/rx power on the ASUS MAP-AC2200

The ASUS MAP-AC2200 suffers from a lower transmit/receive
signal power as compared to the stock firmware.

Upon investigation, it was discovered that stock firmware from
the GPL_MAP-AC2200_3.0.0.4.384.46249-g97d05bb.tar archive.
set the following GPIOs in "release/src/router/rc/init.c".

GPIO 44 and 46 have to be set to output high
GPIO 45 and 47 have to be set to output low

Here are some results, after activating the relevant
gpios through cmdline:

<https://forum.openwrt.org/t/asus-map-ac2200-low-transmit-receive-signal-5ghz/69005/12>

THX @ slh

Fixes: 9ad3967f140 ("ipq40xx: add support for ASUS Lyra")
Signed-off-by: Yushi Nishida <kyro2man@gmx.net>
[slightly rewritten commit, added missing <>)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
3 years agouboot-zynq: fix dtc compilation on host gcc 10
Luis Araneda [Sun, 2 Aug 2020 23:34:42 +0000 (19:34 -0400)]
uboot-zynq: fix dtc compilation on host gcc 10

gcc 10 defaults to -fno-common, which causes an error
when linking.

Back-port the following Linux kernel commit to fix it:
e33a814e772c (scripts/dtc: Remove redundant YYLOC global declaration)

Tested on an Arch Linux host with gcc 10.1.0

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
3 years agoodhcpd: remove local mkdir_p implementation
Daniel Golle [Sun, 13 Dec 2020 00:12:37 +0000 (00:12 +0000)]
odhcpd: remove local mkdir_p implementation

Replace local mkdir_p implementation in favour of using mkdir_p now
added to libubox.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoprocd: update to git HEAD
Daniel Golle [Sat, 12 Dec 2020 23:33:14 +0000 (23:33 +0000)]
procd: update to git HEAD

 111416d jail: remove unreachable code
 7f12c89 treewide: replace local mkdir_p implementations

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agofstools: update to git HEAD
Daniel Golle [Sat, 12 Dec 2020 23:29:59 +0000 (23:29 +0000)]
fstools: update to git HEAD

 0c6fb90 jffs2-reset: allow doing a factory reset and passing a sysupgrade.tgz
 4862530 mount: restorecon: guard against execl() errors
 f415323 block: replace local mkdir_p implementation

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agolibubox: utils: introduce mkdir_p
Daniel Golle [Sat, 12 Dec 2020 23:26:16 +0000 (23:26 +0000)]
libubox: utils: introduce mkdir_p

Add new utility function mkdir_p(char *path, mode_t mode) to replace
the partially buggy implementations found accross fstools and procd.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoselinux-policy: update to version 0.4
Daniel Golle [Sat, 12 Dec 2020 14:45:16 +0000 (14:45 +0000)]
selinux-policy: update to version 0.4

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoxfrm: support 'multicast' attribute on interfaces
Philip Prindeville [Mon, 7 Dec 2020 20:19:30 +0000 (13:19 -0700)]
xfrm: support 'multicast' attribute on interfaces

You shouldn't need the overhead of GRE just to add multicast
capability on a point-to-point interface (for instance, you might
want to run mDNS over IPsec transport connections, and Avahi
requires IFF_MULTICAST be set on interfaces, even point-to-point
ones).

Borrowed heavily from:

    b3c9321b9e gre: Support multicast configurable gre interfaces

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
3 years agoopenssl: update to 1.1.1i
Eneas U de Queiroz [Fri, 11 Dec 2020 11:39:35 +0000 (08:39 -0300)]
openssl: update to 1.1.1i

Fixes: CVE-2020-1971, defined as high severity, summarized as:
NULL pointer deref in GENERAL_NAME_cmp function can lead to a DOS
attack.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
3 years agokernel: add Aquantia AQtion USB-to-5GbE adapters
Marty Jones [Tue, 24 Nov 2020 02:49:10 +0000 (21:49 -0500)]
kernel: add Aquantia AQtion USB-to-5GbE adapters

This add support for USB-to-Ethernet Aquantia AQtion
5/2.5GbE adapters based on the AQC111U controllers.

Run-tested: x86
Adapter-tested: Sabrent NT-SS5G
Signed-off-by: Marty Jones <mj8263788@gmail.com>
3 years agomvebu: fix initramfs/kernel image for CZNIC Turris Omnia
Karel Kočí [Thu, 22 Oct 2020 11:29:57 +0000 (13:29 +0200)]
mvebu: fix initramfs/kernel image for CZNIC Turris Omnia

This adds DTB to kernel and that way makes it possible to easily boot
initramfs image and also kernel.

The sequence to boot initramfs on Omnia is then just:
  env set bootargs earlyprintk console=ttyS0,115200
  dhcp 0x1000000 192.168.1.1:openwrt-mvebu-cortexa9-cznic_turris-omnia-initramfs-kernel.bin
  bootz 0x1000000

Without this change kernel boot won't proceed and is stuck on "Starting
kernel".

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
[fixed From: to match with SoB:]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agodropbear: bump package version
Konstantin Demin [Wed, 25 Nov 2020 03:16:06 +0000 (06:16 +0300)]
dropbear: bump package version

Bump package version after previous changes.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
[added missing commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agodropbear: add ssh-askpass support in configuration
Konstantin Demin [Wed, 25 Nov 2020 03:14:30 +0000 (06:14 +0300)]
dropbear: add ssh-askpass support in configuration

binary size cost is much less than 1k.

tested on ath79/generic:
  bin: 215128 -> 215132 (+4b)
  ipk: 111183 -> 111494 (+311b)

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
3 years agodropbear: roll up recipes into mapping lists
Konstantin Demin [Wed, 25 Nov 2020 03:12:41 +0000 (06:12 +0300)]
dropbear: roll up recipes into mapping lists

this commit removes manual recipes for options and introduces mapping lists:
- DB_OPT_COMMON holds option mappings which are common for all builds;
- DB_OPT_CONFIG holds option mappings which are depend on config settings.

DB_OPT_COMMON is space-separated list of 'words', each of them is in format:
  'header_option|value'

'header_option' is added with value 'value' to 'localoptions.h'.

if 'header_option' is preceded by two exclamation marks ('!!')
then option is not added to 'localoptions.h' but replaced in 'sysoptions.h'.

in short:
   option|value - add option to localoptions.h
 !!option|value - replace option in sysoptions.h

DB_OPT_CONFIG is space-separated list of 'words', each of them is in format:
  'header_option|config_variable|value_enabled|value_disabled'

'header_option' is handled likewise in DB_OPT_COMMON.

if 'config_variable' is enabled (technically: not disabled)
then 'header_option' is set to 'value_enabled' and 'value_disabled' otherwise.

in short:
   option|config|enabled|disabled = add option to localoptions.h
 !!option|config|enabled|disabled = replace option in sysoptions.h

   option := (config) ? enabled : disabled

If you're not sure that option's value doesn't have '|' within - add your recipe
manually right after '$(Build/Configure/dropbear_headers)' and write some words
about your decision.

PS about two exclamation marks:
early idea was to use one exclamation mark to denote such header options
but then i thought single exclamation mark may be overlooked by mistake.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
3 years agodropbear: rework recipes that configure build
Konstantin Demin [Wed, 25 Nov 2020 04:33:25 +0000 (07:33 +0300)]
dropbear: rework recipes that configure build

- add two helper functions to avoid mistakes with
  choice of correct header file to work with
- update rules accordingly

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
3 years agodropbear: reorder options in Configure recipe
Konstantin Demin [Tue, 24 Nov 2020 23:59:59 +0000 (02:59 +0300)]
dropbear: reorder options in Configure recipe

put static options at first place, then place configurable options.
also put DROPBEAR_ECC right before DROPBEAR_ECC_FULL to ease maintainance.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
3 years agodropbear: enable back DROPBEAR_USE_PASSWORD_ENV
Konstantin Demin [Tue, 24 Nov 2020 22:54:05 +0000 (01:54 +0300)]
dropbear: enable back DROPBEAR_USE_PASSWORD_ENV

this option was disabled in 2011 and these long nine years showed us that change was definitely wrong.

binary size cost is much less than 1k.

tested on ath79/generic:
  bin: 215128 -> 215128 (no change)
  ipk: 111108 -> 111183 (+75b)

Fixes: 3c801b3dc0359 ("tune some more options by default to decrease size")
Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
3 years agorealtek: Add missing case in switch statement
Rafał Mikrut [Tue, 8 Dec 2020 21:01:14 +0000 (22:01 +0100)]
realtek: Add missing case in switch statement

Cppcheck shows here duplicated break.

Code `state->speed = SPEED_1000;` will be never executed because above
it there is break statement.

Almost identical statement is placed in another realtek driver
https://github.com/openwrt/openwrt/blob/18a53d43d646290053eff4736ec852efcf6bf510/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c#L286-L294

Signed-off-by: Rafał Mikrut <mikrutrafal@protonmail.com>
3 years agorealtek: Fix self assignment
Rafał Mikrut [Tue, 8 Dec 2020 20:54:40 +0000 (21:54 +0100)]
realtek: Fix self assignment

Cppcheck shows self initialization error, which is an obvious bug.

Basing on logic of similar fragment below I assigned to this variable,
value `RTL838X_LED_GLB_CTRL` which I think is proper.

Signed-off-by: Rafał Mikrut <mikrutrafal@protonmail.com>
3 years agopackage/base-files: caldata: use dd iflag fullblock
John Thomson [Wed, 9 Dec 2020 03:03:04 +0000 (13:03 +1000)]
package/base-files: caldata: use dd iflag fullblock

This dd flag ensures that the requested size
is retrieved from pipes or special filesystems (if available).

Without this flag, on multi-core systems,
Piped or special filesystem data can be truncated
when a size greater than PIPE_BUF is requested.

Fixes: FS#3494
Fixes: 7557e7f ("package/base-files: caldata: work around dd's
limitation")
Cc: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
3 years agowolfssl: fix broken wolfSSL_X509_check_host
Petr Štetiar [Mon, 7 Dec 2020 09:10:49 +0000 (10:10 +0100)]
wolfssl: fix broken wolfSSL_X509_check_host

Backport upstream post 4.5.0 fix for broken wolfSSL_X509_check_host().

References: https://github.com/wolfSSL/wolfssl/issues/3329
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agowolfssl: compile with --enable-opensslall
Eneas U de Queiroz [Mon, 7 Dec 2020 02:43:48 +0000 (23:43 -0300)]
wolfssl: compile with --enable-opensslall

This enables all OpenSSL API available.  It is required to avoid some
silent failures, such as when performing client certificate validation.

Package size increases from 356.6K to 374.7K for
arm_cortex-a9_vfpv3-d16.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>