openwrt/staging/rmilecki.git
3 years agoodhcp6c: fix routing loop on point-to-point links
Hans Dedecker [Wed, 13 Jan 2021 19:06:23 +0000 (20:06 +0100)]
odhcp6c: fix routing loop on point-to-point links

53f07e9 ra: fix routing loop on point to point links
2b6959d ra: align ifindex resolving

Tested-by: Karl Vogel <karl.vogel@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agoipq40xx: mikrotik: enable MikroTik platform driver
Robert Marko [Fri, 30 Oct 2020 17:42:37 +0000 (18:42 +0100)]
ipq40xx: mikrotik: enable MikroTik platform driver

This enables the MikroTik platform driver, it enables us to parse
valuable info from hard_config including WLAN calibration data
extraction from sysfs.

Signed-off-by: Robert Marko <robimarko@gmail.com>
3 years agoipq40xx: mikrotik: enable MikroTik NOR parser
Robert Marko [Fri, 30 Oct 2020 17:40:27 +0000 (18:40 +0100)]
ipq40xx: mikrotik: enable MikroTik NOR parser

Needed for SPI-NOR based MikroTik IPQ40xx devices like hAP ac2.

Signed-off-by: Robert Marko <robimarko@gmail.com>
3 years agoipq40xx: mikrotik: enable CONFIG_MTD_ROUTERBOOT_PARTS
Robert Marko [Fri, 30 Oct 2020 17:39:04 +0000 (18:39 +0100)]
ipq40xx: mikrotik: enable CONFIG_MTD_ROUTERBOOT_PARTS

This enables the new MikroTik specific partition parser.

This avoids manually specifying the MikroTik specific partitions as they
can be detected by their magic values.

Signed-off-by: Robert Marko <robimarko@gmail.com>
3 years agoipq40xx: add MikroTik subtarget
Robert Marko [Thu, 12 Nov 2020 17:13:26 +0000 (18:13 +0100)]
ipq40xx: add MikroTik subtarget

MikroTik devices require the use of raw vmlinux out of the self
extracting compressed kernels.

They also require 4K sectors, kernel2minor, partition parser as well as
RouterBoard platform drivers.

So in order to not add unnecessary code to the generic sub target lets
introduce a MikroTik sub target.

Signed-off-by: Robert Marko <robimarko@gmail.com>
3 years agoipq40xx: kernel compressed boot: reset watchdog countdown
John Thomson [Fri, 23 Oct 2020 09:49:26 +0000 (19:49 +1000)]
ipq40xx: kernel compressed boot: reset watchdog countdown

If the watchdog is enabled, set the timeout to 30 seconds before
decompress is started.

Mikrotik ipq40xx devices running with RouterBoot have the SoC watchdog
enabled and running with a timeout that does not allow time for the
kernel to decompress and manage the watchdog.

On ipq40xx RouterBoot TFTP boot the watchdog countdown is reset before:
Jumping to kernel

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
3 years agoipq40xx: arm: compressed: add appended DTB section
Robert Marko [Fri, 30 Oct 2020 12:58:29 +0000 (13:58 +0100)]
ipq40xx: arm: compressed: add appended DTB section

This adds a appended_dtb section to the ARM decompressor
linker script.

This allows using the existing ARM zImage appended DTB support for
appending a DTB to the raw ELF kernel.

Its size is set to 1MB max to match the zImage appended DTB size limit.

To use it to pass the DTB to the kernel, objcopy is used:

objcopy --set-section-flags=.appended_dtb=alloc,contents \
--update-section=.appended_dtb=<target>.dtb vmlinux

This is based off the following patch:
https://github.com/openwrt/openwrt/commit/c063e27e02a9dcac0e7f5877fb154e58fa3e1a69

Signed-off-by: Robert Marko <robimarko@gmail.com>
3 years agolibusb: make InstallDev explicit
Rosen Penev [Mon, 4 Jan 2021 00:27:10 +0000 (16:27 -0800)]
libusb: make InstallDev explicit

Helps to see what actually gets installed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agolibusb: cleanup PKG_ variables
Rosen Penev [Mon, 4 Jan 2021 00:27:09 +0000 (16:27 -0800)]
libusb: cleanup PKG_ variables

Reordered for consistency between packages.

Fixed license information.

Change PKG_BUILD_PARALLEL to 1. This is no longer a problem.1

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agolibusb: update to 1.0.24
Rosen Penev [Mon, 4 Jan 2021 00:27:08 +0000 (16:27 -0800)]
libusb: update to 1.0.24

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agoipq40xx: split generic images into own file
Alexander Couzens [Sun, 17 Jan 2021 05:54:04 +0000 (06:54 +0100)]
ipq40xx: split generic images into own file

In preparation of the new mikrotik subtarget split the generic images
into generic.mk

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
3 years agoglibc: update to latest 2.32 commit (BZ #20019, BZ #27177, BZ #27130)
Hans Dedecker [Fri, 15 Jan 2021 19:45:38 +0000 (20:45 +0100)]
glibc: update to latest 2.32 commit (BZ #20019, BZ #27177, BZ #27130)

4c619b3eed x86: Check IFUNC definition in unrelocated executable [BZ #20019]
87450ecf8a x86: Set header.feature_1 in TCB for always-on CET [BZ #27177]
2b4f67c2b3 Update for [BZ #27130] fix
1a24bbd43e x86-64: Avoid rep movsb with short distance [BZ #27130]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agoramips: mt7621: refresh the kernel config
Rui Salvaterra [Wed, 2 Dec 2020 15:42:07 +0000 (15:42 +0000)]
ramips: mt7621: refresh the kernel config

The removed config symbols are already enabled by the generic kernel
configuration (or by default), while the added ones are forcefully
enabled by the specific architecture.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agoath79: remove USB port definition for TP-Link TL-WR810N v1
Adrian Schmutzler [Sat, 2 Jan 2021 14:09:09 +0000 (15:09 +0100)]
ath79: remove USB port definition for TP-Link TL-WR810N v1

The USB port definition is only needed when it is linked to a USB
LED. Since there is none for this device, we might as well remove
the port definition.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: Add support for Ubiquiti Bullet AC
Russell Senior [Wed, 23 Dec 2020 02:32:54 +0000 (18:32 -0800)]
ath79: Add support for Ubiquiti Bullet AC

CPU:         Atheros AR9342 rev 3 SoC
RAM:         64 MB DDR2
Flash:       16 MB NOR SPI
WLAN 2.4GHz: Atheros AR9342 v3 (ath9k)
WLAN 5.0GHz: QCA988X
Ports:       1x GbE

Flashing procedure is identical to other ubnt devices.
https://openwrt.org/toh/ubiquiti/common

Flashing through factory firmware
1. Ensure firmware version v8.7.0 is installed.
   Up/downgrade to this exact version.
2. Patch fwupdate.real binary using
   `hexdump -Cv /bin/ubntbox | sed 's/14 40 fe 27/00 00 00 00/g' | \
    hexdump -R > /tmp/fwupdate.real`
3. Make the patched fwupdate.real binary executable using
   `chmod +x /tmp/fwupdate.real`
4. Copy the squashfs factory image to /tmp on the device
5. Flash OpenWrt using `/tmp/fwupdate.real -m <squashfs-factory image>`
6. Wait for the device to reboot
(copied from Ubiquiti NanoBeam AC and modified)

Flashing from serial console
1. Connect serial console (115200 baud)
2. Connect ethernet to a network with a TFTP server, through a
   passive PoE injector.
3. Press a key to obtain a u-boot prompt
4. Set your TFTP server's ip address, with:
   setenv serverip <tftp-server-address>
5. Set the Bullet AC's ip address, with:
   setenv ipaddr <bullet-ac-address>
6. Set the boot file, with:
   setenv bootfile <name-of-initramfs-binary-on-tftp-server>
7. Fetch the binary with tftp:
   tftpboot
8. Boot the initramfs binary:
   bootm
9. From the initramfs, fetch the sysupgrade binary, and flash it with
   sysupgrade.

The Bullet AC is identified as a 2WA board by Ubiquiti. As such, the UBNT_TYPE
must match from the "Flashing through factory firmware" install instructions
to work.

Phy0 is QCA988X which can tune either band (2.4 or 5GHz). Phy1 is AR9342,
on which 5GHz is disabled.  It isn't currently known whether phy1 is
routed to the N connector at all.

Signed-off-by: Russell Senior <russell@personaltelco.net>
3 years agokernel: drop empty kmod-ledtrig-* packages
Sungbo Eo [Mon, 4 Jan 2021 13:52:20 +0000 (22:52 +0900)]
kernel: drop empty kmod-ledtrig-* packages

The following four led triggers are enabled in generic config.

* kmod-ledtrig-default-on
* kmod-ledtrig-heartbeat
* kmod-ledtrig-netdev
* kmod-ledtrig-timer

Drop the packages and remove them from DEVICE_PACKAGES.
There's no other package depending on them in this repo.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
3 years agotreewide: do not disable LED triggers in target config
Sungbo Eo [Mon, 4 Jan 2021 13:33:34 +0000 (22:33 +0900)]
treewide: do not disable LED triggers in target config

Those targets have already enabled some other LED triggers, so enabling
a few more won't be a big problem.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
3 years agokernel: enable CONFIG_LEDS_TRIGGER_HEARTBEAT
Sungbo Eo [Mon, 4 Jan 2021 13:27:28 +0000 (22:27 +0900)]
kernel: enable CONFIG_LEDS_TRIGGER_HEARTBEAT

The heartbeat trigger is used by luci-mod-system, which is installed
as a part of the standard luci package set. It seems the LED trigger
will be required quite often, so let's enable it by default.

This increases uncompressed kernel size by about 100 bytes on ath79/generic.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
3 years agohostapd: fix setting wps_state to "not configured"
Leon M. George [Tue, 12 Jan 2021 09:30:08 +0000 (10:30 +0100)]
hostapd: fix setting wps_state to "not configured"

With encryption disabled, it was intended to set wpa_state=1 (enabled,
not configured) through the 'wps_not_configured' flag.
The flag is set appropriately but the condition using it is broken.
Instead, 'wps_configured' is checked and wpa_state is always 2 (enabled,
configured). Fix it by using the correct variable name.

Fixes: 498d84fc4e00 ("netifd: add wireless configuration support
and port mac80211 to the new framework")

Signed-off-by: Leon M. George <leon@georgemail.eu>
[commit title/message improvements]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: update kmod-thermal package
Sungbo Eo [Sun, 3 Jan 2021 13:40:01 +0000 (22:40 +0900)]
kernel: update kmod-thermal package

CONFIG_THERMAL option was changed to boolean in upstream linux commit
554b3529fe01 ("thermal/drivers/core: Remove the module Kconfig's option").
Switch it to 'y' and remove FILES and AUTOLOAD for non-existant module file.

And update the descripton text for the package as in upstream linux commit
eb8504620381 ("thermal: Rephrase the Kconfig text for thermal").

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
3 years agoowipcalc: use v6 in cidr_parse6 function
Nick Hainke [Wed, 13 Jan 2021 15:06:03 +0000 (16:06 +0100)]
owipcalc: use v6 in cidr_parse6 function

The cidr_parse6 function parses a string to an ipv6-address.
The cidr struct contains a union called buf for the ipv4 and ipv6
address. Since it is a char pointer and the struct is initialized with
the maximum size (so ipv6 string) it does not make any difference.
However, we should access the buffer using the v6 name, since it could
be confusing otherwise.

Signed-off-by: Nick Hainke <vincent@systemli.org>
3 years agoipq806x: fix Ubiquiti UniFi AC HD partition map
Jan Alexander [Thu, 14 Jan 2021 13:55:22 +0000 (14:55 +0100)]
ipq806x: fix Ubiquiti UniFi AC HD partition map

This fixes a typo in the previously committed partition map that led to
the extension of the read-only mtd partition "SSD" into the following
partitions.

Fixes: 4e46beb31342 ("ipq806x: add support for Ubiquiti UniFi AC HD")
Signed-off-by: Jan Alexander <jan@nalx.net>
3 years agokernel: bump 5.4 to 5.4.89
John Audia [Sat, 9 Jan 2021 14:10:40 +0000 (09:10 -0500)]
kernel: bump 5.4 to 5.4.89

All modification made by update_kernel.sh in a fresh clone without
existing toolchains.

Build system: x86_64
Build-tested: ipq806x/R7800, bcm27xx/bcm2711
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [x86/64]
3 years agomac80211: fix rounding error in minstrel_ht throughput calculation
Felix Fietkau [Fri, 15 Jan 2021 12:05:25 +0000 (13:05 +0100)]
mac80211: fix rounding error in minstrel_ht throughput calculation

Fixes rate selection with lower data rates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agoscripts: target-metadata don't add PROFILES twice
Paul Spooren [Wed, 15 Apr 2020 00:49:54 +0000 (14:49 -1000)]
scripts: target-metadata don't add PROFILES twice

Since 4ee3cf2b5a profiles with alternative vendor names may appear
multiple times in `tmp/.targetinfo` or `.targetinfo` (for
ImageBuilders).

The `target-metadata.pl` script adds these profiles then twice to
`PROFILE_NAMES` and the ImageBuilder show the profile twice when running
`make info`.

This patch removes duplicate profile IDs and only adds them once to
`.profiles.mk`.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agokernel: make lwtunnel support optional
Rui Salvaterra [Thu, 14 Jan 2021 15:24:58 +0000 (15:24 +0000)]
kernel: make lwtunnel support optional

Not everyone will want to bloat their kernel by 24 kiB for such a niche
feature.

Fixes: a1a7f3274e0ed27511d45f62ee20281d8d57c7af "kernel: enable SRv6 support by
enabling lwtunnel"

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agobcm4908: prepend kernel images with a custom header
Rafał Miłecki [Wed, 13 Jan 2021 08:16:46 +0000 (09:16 +0100)]
bcm4908: prepend kernel images with a custom header

It's required for CFE to accept kernel.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908kernel: tool adding BCM4908 kernel header
Rafał Miłecki [Wed, 13 Jan 2021 07:11:00 +0000 (08:11 +0100)]
firmware-utils: bcm4908kernel: tool adding BCM4908 kernel header

BCM4908 CFE bootloader requires kernel to be prepended with a custom
header. This simple tool implements support for such headers.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agoglibc: add arc700 patch
Rosen Penev [Fri, 25 Dec 2020 00:36:16 +0000 (16:36 -0800)]
glibc: add arc700 patch

glibc does not officially support ARC700 so this adds the missing
pieces. I looked at uClibc-ng and a patch by Synopsis for glibc.

ran make toolchain/glibc/refresh to clean up fuzz.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agomac80211: fix an uninitialized stack variable in the minstrel update
Felix Fietkau [Thu, 14 Jan 2021 19:12:08 +0000 (20:12 +0100)]
mac80211: fix an uninitialized stack variable in the minstrel update

It can lead to out-of-bounds access and invalid rates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomt76: update to the latest version
Felix Fietkau [Thu, 14 Jan 2021 13:05:58 +0000 (14:05 +0100)]
mt76: update to the latest version

a46f9a9160e9 mt76: mt7915: add vif check in mt7915_update_vif_beacon()
27ad12352ac9 mt76: mt7615: add vif check in mt7615_update_vif_beacon()
0a449cef024e mt76: mt7915: fix MT_CIPHER_BIP_CMAC_128 setkey
eacd2d493c61 mt76: mt7915: reset token when mac_reset happens
e4b23301e6c9 mt76: mt7615: reset token when mac_reset happens
6e22bbfe0360 mt76: mt7615: convert comma to semicolon
37865118ae2d mt76: mt7915: convert comma to semicolon
742c36b2e527 mt76: mt7915: run mt7915_configure_filter holding mt76 mutex
a515727e8423 mt76: mt7915: add support for flash mode
b6f7b3da5216 mt76: mt7915: fix endianness warning in mt7915_mcu_set_radar_th
062f3f4f06a2 mt76: mt7915: simplify mt7915_mcu_send_message routine
dbba9b993300 mt76: mt7915: drop zero-length packet to avoid Tx hang
36a745d0f71c mt76: Fix queue ID variable types after mcu queue split
a4539760b0b1 mt7915: update the testmode support to the latest upstream patch
64bd6f87e4c2 mt7915: fix crash on failure in pci_set_dma_mask
c202ace409e0 mt76: remove unused variable q
d1b827781f84 mt76: mt7915: add partial add_bss_info command on testmode init
a897a69769f5 mt76: testmode: introduce dbdc support
b44472e99822 mt76: testmode: move mtd part to mt76_dev
45e27e6cdc12 mt76: mt7915: move testmode data from dev to phy
b6673b005770 mt76: mt7615: move testmode data from dev to phy
abdd471e9f2d mt76: mt7915: fix ht mcs in mt7915_mcu_get_rx_rate()
d679b56b9585 mt76: move mac_work in mt76_core module
36cd48ab4454 mt76: move chainmask in mt76_phy
89a6781ed045 mt76: mt7915: force ldpc for bw larger than 20MHz in testmode
3d0834e78005 mt76: testmode: add support to set user-defined spe index
cc05f4679667 mt76: testmode: add attributes for ipg related parameters
77b18b16fe16 mt76: testmode: make tx queued limit adjustable
6365a58573cb mt76: mt7915: split edca update function
e56282bf67f6 mt76: mt7915: add support for ipg in testmode
6fa642903e4e mt76: mt7915: calculate new packet length when tx_time is set in testmode
729ec5daeba5 mt76: mt7915: clean hw queue before starting new testmode tx
981443da5cf7 mt76: testmode: add a new state for continuous tx
4793fc9b3d48 mt76: mt7915: rework set state part in testmode
11a1e86e5946 mt76: mt7915: add support for continuous tx in testmode
364affef82fc mt76: mt7615: mt7915: disable txpower sku when testmode enabled
9fc19db51293 mt76: mt7915: simplify peer's TxBF capability check
6377b7f330be mt76: mt7915: add implicit Tx beamforming support
983091a40633 mt76: mt7915: fix MESH ifdef block
bbb7a9e77751 mt76: mt76u: fix NULL pointer dereference in mt76u_status_worker
a28a8dd2f7de mt76: usb: fix crash on device removal
9c312f2ce2c5 mt76: mt7915: rework mcu API
e6fe82acb111 mt76: mt7915: disable RED support in the WA firmware
25d7429bdc41 mt76: mt7915: fix eeprom parsing for DBDC
7a93026dd3dc mt76: mt7915: fix eeprom DBDC band selection
4c8a09cc45d0 tools: Set mode for new file /tmp/mt76-test-%s

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agotools/fakeroot: fix build regression on macOS
Felix Fietkau [Mon, 11 Jan 2021 17:03:29 +0000 (18:03 +0100)]
tools/fakeroot: fix build regression on macOS

AT_EMPTY_PATH and AT_NO_AUTOMOUNT does not exist there

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobcm4908: backport brcmstb USB PHY driver changes
Rafał Miłecki [Thu, 14 Jan 2021 11:13:49 +0000 (12:13 +0100)]
bcm4908: backport brcmstb USB PHY driver changes

This includes BCM4908 support

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agohostapd: fix key_mgmt typo
Leon M. George [Tue, 12 Jan 2021 08:38:02 +0000 (09:38 +0100)]
hostapd: fix key_mgmt typo

The key_mgmt variable was mistyped when checking against "WPS", so
the if clause was never entered.

Fixes: f5753aae233f ("hostapd: add support for WPS pushbutton station")
Signed-off-by: Leon M. George <leon@georgemail.eu>
[add commit message, bump PKG_RELEASE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agohostapd: remove trailing whitespaces
Leon M. George [Tue, 12 Jan 2021 09:32:06 +0000 (10:32 +0100)]
hostapd: remove trailing whitespaces

Signed-off-by: Leon M. George <leon@georgemail.eu>
3 years agohostapd: remove unused variable
Leon M. George [Tue, 12 Jan 2021 09:07:44 +0000 (10:07 +0100)]
hostapd: remove unused variable

'base' was never used.

Fixes: 498d84fc4e00 ("netifd: add wireless configuration support
and port mac80211 to the new framework")

Signed-off-by: Leon M. George <leon@georgemail.eu>
3 years agohostapd: remove unused variable
Leon M. George [Tue, 12 Jan 2021 08:47:47 +0000 (09:47 +0100)]
hostapd: remove unused variable

'enc_str' was never used.

Fixes: 498d84fc4e00 ("netifd: add wireless configuration support
and port mac80211 to the new framework")

Signed-off-by: Leon M. George <leon@georgemail.eu>
3 years agohostapd: run as user 'network' if procd-ujail is installed
Daniel Golle [Sun, 10 Jan 2021 19:12:05 +0000 (19:12 +0000)]
hostapd: run as user 'network' if procd-ujail is installed

Granting capabilities CAP_NET_ADMIN and CAP_NET_RAW allows running
hostapd and wpa_supplicant without root priviledges.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agomac80211: improve error handling when adding hostapd config
Daniel Golle [Tue, 12 Jan 2021 00:29:18 +0000 (00:29 +0000)]
mac80211: improve error handling when adding hostapd config

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agohostapd: improve error handling when adding supplicant config
Daniel Golle [Tue, 12 Jan 2021 00:28:17 +0000 (00:28 +0000)]
hostapd: improve error handling when adding supplicant config

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agohostapd: add multicast_to_unicast and per_sta_vif
Etan Kissling [Wed, 13 Jan 2021 08:52:02 +0000 (09:52 +0100)]
hostapd: add multicast_to_unicast and per_sta_vif

This allows configuration of multicast_to_unicast and per_sta_vif options.
- multicast_to_unicast requests multicast-to-unicast conversion.
- per_sta_vif assigns each station its own AP_VLAN interface.

Signed-off-by: Etan Kissling <etan_kissling@apple.com>
3 years agombedtls: add config option to compile with hkdf
Etan Kissling [Wed, 13 Jan 2021 00:01:24 +0000 (01:01 +0100)]
mbedtls: add config option to compile with hkdf

This adds a config option to allow compiling with HKDF algorithm support
to support applications that require this feature.

Signed-off-by: Etan Kissling <etan_kissling@apple.com>
3 years agonf-conntrack: allow querying conntrack info in nfqueue
Etan Kissling [Tue, 12 Jan 2021 23:54:08 +0000 (00:54 +0100)]
nf-conntrack: allow querying conntrack info in nfqueue

This allows libnetfilter_queue to access connection tracking information
by requesting NFQA_CFG_F_CONNTRACK. Connection tracking information is
provided in the NFQA_CT attribute.
CONFIG_NETFILTER_NETLINK_GLUE_CT enables the interaction between
nf_queue and nf_conntrack_netlink. Without this option, trying to access
connection tracking information results in "Operation not supported".

Signed-off-by: Etan Kissling <etan_kissling@apple.com>
3 years agokernel: drop unneeded kernel version dependency
Andy Walsh [Mon, 11 Jan 2021 14:22:30 +0000 (15:22 +0100)]
kernel: drop unneeded kernel version dependency

The current master only supports kernel 5.4, and there is no reason
to remove KERNEL_IO_URING for future kernels.

Drop the unneeded dependency.

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
[improve commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agozstd: fix package source
David Bauer [Mon, 7 Dec 2020 03:53:02 +0000 (04:53 +0100)]
zstd: fix package source

It looks like GitHub changed the URL path for release tarballs, thus the
download for the zstd package was always falling back to the OpenWrt
sources mirror.

Fix the GitHub URL for one which works. The file hash remains unchanged.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agouboot-envtools: add support for Aruba AP-303 and AP-365
Jan Alexander [Sat, 9 Jan 2021 10:33:34 +0000 (11:33 +0100)]
uboot-envtools: add support for Aruba AP-303 and AP-365

Both devices use u-boot env variables to boot OpenWrt from its flash
partition. Using u-boot envtools, it is possible to change the bootcmd
back to the stock firmware partition directly from OpenWrt without
attaching a serial cable or even physically accessing the device.

Signed-off-by: Jan Alexander <jan@nalx.net>
3 years agoipq806x: add support for Ubiquiti UniFi AC HD
Jan Alexander [Mon, 30 Nov 2020 10:51:16 +0000 (11:51 +0100)]
ipq806x: add support for Ubiquiti UniFi AC HD

Hardware
--------

SoC:   Qualcomm IPQ8064
RAM:   512MB DDR3
Flash: 256MB NAND (Micron MT29F2G08ABBEAH4)
       32MB SPI-NOR (Macronix MX25U25635F)
WLAN:  Qualcomm Atheros QCA9994 4T4R b/g/n
       Qualcomm Atheros QCA9994 4T4R a/n/ac
ETH:   eth0 - SECONDARY (Atheros AR8033)
       eth1 - MAIN (Atheros AR8033)
USB:   USB-C
LED:   Dome (white / blue)
BTN:   Reset

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

Copy the OpenWrt sysupgrade image to the /tmp directory of the device
using scp. Default IP address is 192.168.1.20 and default username and
password are "ubnt".

SSH to the device and write the bootselect flag to ensure it is booting
from the mtd partition the OpenWrt image will be written to. Verify the
output device below matches mtd partition "bootselect" using /proc/mtd.

> dd if=/dev/zero bs=1 count=1 seek=7 conv=notrunc of=/dev/mtd11

Write the OpenWrt sysupgrade image to the mtd partition labeled
"kernel0". Also verify the used partition device using /proc/mtd.

> dd if=/tmp/sysupgrade.bin of=/dev/mtdblock12

Reboot the device.

Back to stock
-------------

Use the TFTP recovery procedure with the Ubiquiti firmware image to
restore the vendor firmware.

Signed-off-by: Jan Alexander <jan@nalx.net>
3 years agouboot-rockchip: update NanoPi R2S patches
David Bauer [Tue, 12 Jan 2021 23:33:10 +0000 (00:33 +0100)]
uboot-rockchip: update NanoPi R2S patches

Update the NanoPi R2S to the latest version submitted
upstream.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agouboot-rockchip: update to v2021.01
Marty Jones [Mon, 11 Jan 2021 23:35:29 +0000 (18:35 -0500)]
uboot-rockchip: update to v2021.01

Update the U-Boot to version v2021.01.

Run-tested: FriendlyARM NanoPi R2S
            Radxa Rock Pi 4
            Pine64 RockPro64

Signed-off-by: Marty Jones <mj8263788@gmail.com>
[format commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoiw: enable HE PHY information for iw-tiny
David Bauer [Sun, 3 Jan 2021 20:43:57 +0000 (21:43 +0100)]
iw: enable HE PHY information for iw-tiny

Currently PHY information obtained from "iw phy" lacks information about
a PHYs HE capabilities when using the by default installed iw-tiny.

As there are already 802.11ax supported devices, enabled printing this
information for the by-default installed iw variant.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agobcm4908: backport BCM4908 integrated switch initial support
Rafał Miłecki [Wed, 13 Jan 2021 10:01:13 +0000 (11:01 +0100)]
bcm4908: backport BCM4908 integrated switch initial support

Upstream driver supports bridging ports. There is no support for
crossbar setup or CPU port(s) yet.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm4908: backport PMB (Power Management Bus) driver
Rafał Miłecki [Wed, 13 Jan 2021 06:41:34 +0000 (07:41 +0100)]
bcm4908: backport PMB (Power Management Bus) driver

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm4908: add simple PCIe reset controller support
Rafał Miłecki [Tue, 12 Jan 2021 22:27:08 +0000 (23:27 +0100)]
bcm4908: add simple PCIe reset controller support

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm4908: backport upstream DTS patches
Rafał Miłecki [Tue, 12 Jan 2021 22:03:41 +0000 (23:03 +0100)]
bcm4908: backport upstream DTS patches

1. Netgear R8000P DTS file
2. NAND fix
3. PCIe reset block
4. Integrated switch
5. PMB block

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm4908: initial work on the Broadcom BCM4908 target
Rafał Miłecki [Fri, 8 Jan 2021 12:32:37 +0000 (13:32 +0100)]
bcm4908: initial work on the Broadcom BCM4908 target

BCM4906, BCM4908 and BCM49408 are SoCs with 64 bit ARMv8 B53 CPUs.
Upstream Linux is slowly getting support for that SoCs family so it
makes sense to add target for it.

This prepares initial support for:

1. Asus GT-AC5300
BCM4908 based device (4 CPUs) with 1024 MiB RAM, NAND, 8 LAN ports.

2. Netgear R8000P
BCM4906 based device (2 CPUs) with 512 MiB RAM, NAND, 4 LAN ports.

Flashing info will come later as we learn how to generate proper images.

It isn't usable yet (it only produces a bootable kernel) so "source-only"
is used.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agokernel: enable SRv6 support by enabling lwtunnel
Nick Hainke [Sat, 12 Dec 2020 10:23:54 +0000 (11:23 +0100)]
kernel: enable SRv6 support by enabling lwtunnel

Enable the ability to use segment routing based on IPv6. It allows the
packet to specify a path that the packet should take through the
network.

Lwtunnel allow an easy encapsulation of a package. You can just install
ip-full package and use it:

  ip -6 route add  2003::/64 dev eth0 encap seg6 mode encap \
    segs 2001::1,2002::2

An IPv6 package looks like this:
  [IPv6 HDR][IPv6 RH][IPv6 HDR][Data...]

Netifd support:
  https://git.openwrt.org/?p=project/netifd.git;
     a=commit;h=458b1a7e9473c150a40cae5d8be174f4bb03bd39

Increases imagesize by 24.125 KiB. Therefore, only enable for devices
with enough flash.

Signed-off-by: Nick Hainke <vincent@systemli.org>
3 years agotools/ccache: find libzstd using rpath
Thomas Nixon [Sat, 9 Jan 2021 22:04:48 +0000 (22:04 +0000)]
tools/ccache: find libzstd using rpath

Previously, ccache would end up using the system libzstd, which is not
supposed to be a build requirement.

Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
3 years agorockchip: add missing Kconfig symbols
David Bauer [Mon, 11 Jan 2021 04:57:52 +0000 (05:57 +0100)]
rockchip: add missing Kconfig symbols

When compiling with CONFIG_ALL_KMODS enabled, compilation might stall
due to unset rockchip-specific config symbols. Disable these to avoid
stalling this step.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoqemu: remove obsolete package
Paul Spooren [Thu, 31 Dec 2020 04:11:54 +0000 (18:11 -1000)]
qemu: remove obsolete package

Instead of using an ancient qemu version in-tree the building machine
should just have qemu-utils installed.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agobuild/image: warn if missing qemu-img for VDI/VMDK
Paul Spooren [Wed, 30 Dec 2020 19:08:17 +0000 (09:08 -1000)]
build/image: warn if missing qemu-img for VDI/VMDK

Currently `qemu-img` is used to convert raw x86 images to VDI and VMDK
images, used for virtual machines.

Having `qemu-img` in tree requires us to maintain an ancient version of
`qemu-utils`, which recently required extra work to compile with newer
compiler version.

This commit prints a warning message in case `qemu-img` is missing.

As a next step the in-tree version of `qemu-img` can be removed.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agomac80211: use hostapd PID returned from config_add
Daniel Golle [Mon, 7 Dec 2020 13:46:43 +0000 (13:46 +0000)]
mac80211: use hostapd PID returned from config_add

Use PID returned from config_add instead of querying procd when adding
configuration to hostapd.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agohostapd: return PID on config_add call
Daniel Golle [Mon, 7 Dec 2020 13:12:46 +0000 (13:12 +0000)]
hostapd: return PID on config_add call

To simplify the way netifd acquires the PIDs of wpa_supplicant and
hostapd let the config_add method of both of them return the PID of the
called process. Use the returned PID instead of querying procd when
adding wpa_supplicant configuration.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoglibc: update to latest 2.32 commit (BZ #24973)
Hans Dedecker [Sun, 10 Jan 2021 12:11:06 +0000 (13:11 +0100)]
glibc: update to latest 2.32 commit (BZ #24973)

0d9793e82a Fix buffer overrun in EUC-KR conversion module (bz #24973)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agokernel-defaults: Manage the enabling/disabling of ZSTD
Florian Fainelli [Sun, 13 Sep 2020 02:48:34 +0000 (19:48 -0700)]
kernel-defaults: Manage the enabling/disabling of ZSTD

Linux 5.9 introduces support for ZSTD ramdisk and initrd compression,
make sure we enable/disable the relevant options when building an
initramfs enabled kernel.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
3 years agokernel-defaults: Delete external source tree user_headers
Florian Fainelli [Sun, 13 Sep 2020 00:09:53 +0000 (17:09 -0700)]
kernel-defaults: Delete external source tree user_headers

When we use an external kernel tree which may not have been fully
cleaned, there may be user_headers left which do not match the target
architecture, leading to build failures for packages that do an explicit
inclusion of user_headers (such as iproute2 or iptables). Make sure we
delete them while preparing the directory.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
3 years agoiptables: update to 1.8.6
Curtis Deptuck [Thu, 3 Dec 2020 00:28:39 +0000 (17:28 -0700)]
iptables: update to 1.8.6

Update iptables to 1.8.6

ChangeLog:
https://netfilter.org/projects/iptables/files/changes-iptables-1.8.6.txt

Refresh patch:
101-remove-check-already.patch

Signed-off-by: Curtis Deptuck <curtdept@me.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [refresh patches]
3 years agokernel: bump 5.4 to 5.4.87
John Audia [Wed, 6 Jan 2021 17:37:16 +0000 (12:37 -0500)]
kernel: bump 5.4 to 5.4.87

All modification by update_kernel.sh.

Build system: x86_64
Build-tested: ipq806x/R7800, bcm27xx/bcm2711
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Compile-tested [*]: ath79/{generic,tiny}, ipq40xx, octeon,
                    ramips/mt7621, realtek, x86/64.
Run-tested [*]:     ramips/mt7621 (DIR-878 A1, R6800, RT-AC57U),
                    octeon (EdgeRouter Lite).

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org> [*]
3 years agorealtek: add support for ZyXEL GS1900-8HP v1 and v2
Stijn Segers [Fri, 8 Jan 2021 13:32:48 +0000 (14:32 +0100)]
realtek: add support for ZyXEL GS1900-8HP v1 and v2

The ZyXEL GS1900-8HP is an 8 port gigabit switch with PoE+ support.
There are two versions on the market (v1 & v2) which share similar
specs (same flash size and flash layout, same RAM size, same PoE+ power
envelope) but have a different case and board layout that they each
share with other GS1900 siblings.

The v1 seems to share its PCB and case with non-PoE GS1900-8; as such,
adding support for the GS1900-8 would probably be trivial. The v2 seems
to share its casing and platform with its already supported bigger
brother, the GS1900-10HP - its board looks the same, except for two
holes where the GS1900-10 has its SFP ports.

Like their 10 port sibling, both devices have a dual firmware layout.
Both GS1900-8HP boards have the same 70W PoE+ power budget. In order to
manipulate the PoE+, one needs the rtl83xx-poe package [1].

After careful consideration it was decided to go with separate images
for each version.

Specifications (v1)
-------------------
* SoC:       Realtek RTL8380M 500 MHz MIPS 4KEc
* Flash:     Macronix MX25L12835F 16 MiB
* RAM:       Nanya NT5TU128M8HE-AC 128 MiB DDR2 SDRAM
* Ethernet:  8x 10/100/1000 Mbit
* PoE+:      Broadcom BCM59111KMLG (IEEE 802.3at-2009 compliant, 2x)
* UART:      1 serial header with populated standard pin connector on the
             left side of the PCB, towards the bottom. Pins are labeled:
             + VCC (3.3V)
             + TX
             + RX
             + GND

Specifications (v2)
-------------------
* SoC:       Realtek RTL8380M 500 MHz MIPS 4KEc
* Flash:     Macronix MX25L12835F 16 MiB
* RAM:       Samsung K4B1G0846G 128 MiB DDR3 SDRAM
* Ethernet:  8x 10/100/1000 Mbit
* PoE+:      Broadcom BCM59121B0KMLG (IEEE 802.3at-2009 compliant)
* UART:      1 angled serial header with populated standard pin connector
             accessible from outside through the ventilation slits on the
             side. Pins from top to bottom are clearly marked on the PCB:
             + VCC (3.3V)
             + TX
             + RX
             + GND

Serial connection parameters for both devices: 115200 8N1.

Installation
------------
Instructions are identical to those for the GS1900-10HP and apply both
to the GS1900-8HP v1 and v2 as well.

* Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10).
* Set up a TFTP server on your client and make it serve the initramfs
  image.
* Connect serial, power up the switch, interrupt U-boot by hitting the
  space bar, and enable the network:
  > rtk network on
* Since the GS1900-10HP is a dual-partition device, you want to keep the
  OEM firmware on the backup partition for the time being. OpenWrt can
  only boot off the first partition anyway (hardcoded in the DTS). To
  make sure we are manipulating the first partition, issue the following
  commands:
  > setsys bootpartition 0
  > savesys
* Download the image onto the device and boot from it:
  > tftpboot 0x84f00000 192.168.1.10:openwrt-realtek-generic-zyxel_gs1900-8hp-v{1,2}-initramfs-kernel.bin
  > bootm
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
  > sysupgrade /tmp//tmp/openwrt-realtek-generic-zyxel_gs1900-8hp-v{1,2}-squashfs-sysupgrade.bin

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
[merge PoE case, keep device definitions separate, change all those
hashes in the commit message to something else so they don't get
removed when changing the commit ...]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agorealtek: remove model prefix from LED label for ZyXEL GS1900
Adrian Schmutzler [Fri, 8 Jan 2021 19:37:37 +0000 (20:37 +0100)]
realtek: remove model prefix from LED label for ZyXEL GS1900

This is used as fixed status LED, so no migration is needed.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agorealtek: introduce shared DTSI for GS1900 series
Stijn Segers [Fri, 8 Jan 2021 13:32:47 +0000 (14:32 +0100)]
realtek: introduce shared DTSI for GS1900 series

The ZyXEL GS1900-8HP v1, v2 and GS1900-10HP are all built on a similar
Realtek RTL8380M platform. Create a common DTSI in preparation for
GS1900-8HP support, and switch to the macros defined in rtl838x.dtsi.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
[drop redundant includes, use &mdio directly, do not replace SFP
ports]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: add hid-cp2112 driver support
Pawel Dembicki [Mon, 4 Jan 2021 16:59:30 +0000 (17:59 +0100)]
kernel: add hid-cp2112 driver support

This patch adds kernel module for Silicon Labs CP2112 HID USB to SMBus
Master Bridge. This is a HID device driver which registers as an i2c
adapter and gpiochip to expose these functions of the CP2112.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
3 years agoramips: remove trailing whitespace in Makefiles
Leon M. George [Tue, 5 Jan 2021 09:42:34 +0000 (10:42 +0100)]
ramips: remove trailing whitespace in Makefiles

Remove trailing whitespaces in two *.mk files.

Signed-off-by: Leon M. George <leon@georgemail.eu>
[fix title, add message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agorealtek: ZyXEL: spell as done by manufacturer
Stijn Segers [Wed, 6 Jan 2021 21:45:19 +0000 (22:45 +0100)]
realtek: ZyXEL: spell as done by manufacturer

ZyXEL spells its own name all uppercase with just the Y lowercase. Adapt
the realtek target to follow this (other OpenWrt targets already do so).

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
3 years agorealtek: move memory node to device DTS
Stijn Segers [Wed, 6 Jan 2021 21:45:18 +0000 (22:45 +0100)]
realtek: move memory node to device DTS

Move the memory out of the rtl838x.dtsi and into the device family DTSI
or device DTS if applicable. This aligns with upstream practice.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
[add missing block for dgs-1210-10p, move block below chosen node]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agorealtek: remove duplicate '/dts-v1/;' identifier
Adrian Schmutzler [Thu, 7 Jan 2021 18:30:36 +0000 (19:30 +0100)]
realtek: remove duplicate '/dts-v1/;' identifier

The identifier is already present in rtl838x.dtsi, and adding it
twice is not only redundant but actually wrong.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agorealtek: set PoE power budget for ZyXEL GS1900-10HP
Stijn Segers [Wed, 6 Jan 2021 21:45:17 +0000 (22:45 +0100)]
realtek: set PoE power budget for ZyXEL GS1900-10HP

As per the manufacturer's specifications, set the GS1900-10HP PoE power
budget to 77W.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
3 years agobase-files: read all 3 bytes in get_magic_vfat() at once
Adrian Schmutzler [Mon, 4 Jan 2021 00:28:44 +0000 (01:28 +0100)]
base-files: read all 3 bytes in get_magic_vfat() at once

While the speed improvement might be negligible, there is still no
reason to read individual bytes.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: make Engenius fakeroot partitions read-only
Michael Pratt [Fri, 1 Jan 2021 22:08:34 +0000 (17:08 -0500)]
ath79: make Engenius fakeroot partitions read-only

For:

 - ENH202 v1
 - ENS202EXT v1

These boards were committed before it was discovered
that for all Engenius boards with a "failsafe" image,
forcing the failsafe image to load next boot
can be achieved by editing the u-boot environment like:

  `fw_setenv rootfs_checksum 0`

So it's not necessary to delete a partition to boot to failsafe image.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
3 years agoath79: move small-flash Engenius boards to tiny
Michael Pratt [Fri, 1 Jan 2021 21:48:52 +0000 (16:48 -0500)]
ath79: move small-flash Engenius boards to tiny

This moves some of the Engenius boards from generic to tiny:

 - EAP350 v1
 - ECB350 v1
 - ENH202 v1

For these, factory.bin builds are already failing on master
branch because of the unique situation for these boards:

 - 8 MB flash
 - an extra "failsafe" image for recovery
 - TFTP does not work (barely possible with 600 MTU)
 - bootloader loads image from a longer flash offset
 - 1 eraseblock each needed for OKLI kernel loader and fake rootfs
 - using mtd-concat to make use of remaining space...

The manual alternative would be removing the failsafe partition.
However this comes with the risk of extremely difficult recovery
if a flash ever fails because TFTP on the bootloader is bugged.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
[improve commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoimx6: disable unrequired pcie host driver
Koen Vandeputte [Thu, 7 Jan 2021 10:34:45 +0000 (11:34 +0100)]
imx6: disable unrequired pcie host driver

imx6 has it's own pcie host driver so we do
not need the one from DW.

This fixes following boot error:

[    0.156913] dw-pcie 1ffc000.pcie: IRQ index 1 not found

Fixes: 6d5291ff7244 ("imx6: add support for kernel 5.4")
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
3 years agoimx6: refresh kernel config
Koen Vandeputte [Thu, 7 Jan 2021 10:28:27 +0000 (11:28 +0100)]
imx6: refresh kernel config

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
3 years agoimx6: gw52xx: fix duplicate regulator naming
Koen Vandeputte [Thu, 7 Jan 2021 09:22:54 +0000 (10:22 +0100)]
imx6: gw52xx: fix duplicate regulator naming

2 regulator descriptions carry identical naming.

This leads to following boot warning:
[    0.173138] debugfs: Directory 'vdd1p8' with parent 'regulator' already present!

Fix this by renaming the one used for audio.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
3 years agotools/cmake: always use non-ccache CC and CXX variables
Sven Wegener [Fri, 1 Jan 2021 11:27:33 +0000 (12:27 +0100)]
tools/cmake: always use non-ccache CC and CXX variables

cmake is a dependency of ccache, which means it is build before ccache
is available and hence must be build with non-ccache CC and CXX. It
currently works, because the cmake build system splits the compiler
variable and treats them as multiple compilers to check.

For "ccache gcc" it first tests for "ccache", which always fails,
because ccache is not a compiler by itself, even if it is available, and
then ends up calling "gcc" alone, effectively never using ccache.

Let's make this explicit by forcing the use of non-ccache CC and CXX.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
3 years agolua: add -ldl for glibc builds
Rosen Penev [Sat, 2 Jan 2021 23:56:25 +0000 (15:56 -0800)]
lua: add -ldl for glibc builds

For glibc, lua needs an explicit link to libdl as glibc has it separate

Fixes the following error in at least collectd:

ld: usr/lib/liblua.so: undefined reference to `dlopen'
ld: usr/lib/liblua.so: undefined reference to `dlclose'
ld: usr/lib/liblua.so: undefined reference to `dlerror'
ld: usr/lib/liblua.so: undefined reference to `dlsym'

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agobuild: use ccache -C for cleaning the cache
Sven Wegener [Fri, 1 Jan 2021 10:46:04 +0000 (11:46 +0100)]
build: use ccache -C for cleaning the cache

This keeps the configuration, like the size of the cache, and the
statistics intact. Move the removal of the cache directory to the
distclean target, but only delete the .ccache directory inside of our
build tree, as we should not mess with a user-configured external ccache
directory this destructively.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
3 years agorpcd: update to git HEAD
Daniel Golle [Tue, 5 Jan 2021 20:02:52 +0000 (20:02 +0000)]
rpcd: update to git HEAD

 fd017ba iwinfo: add ht and vht operation info to wifi scan
 4c66b31 iwinfo: export center channel for info ubus call
 e28d4a5 iwinfo: add support for 802.11ad and GCMP
 5c15f57 iwinfo: return hwmode 'ad' on 802.11ad-only hardware
 ea7f471 iwinfo: include ht_operation data only if available

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoiwinfo: improve ABI version handling and bump to git HEAD
Jo-Philipp Wich [Wed, 6 Jan 2021 22:26:15 +0000 (23:26 +0100)]
iwinfo: improve ABI version handling and bump to git HEAD

 - Encode ABI version in compiled shared object file
 - Only ship versioned shared library

 a17f561 iwinfo: detect QCA IPQ4019 WiSoC from FDT
 ea28dfb iwinfo: export ht and vht operation in scan results
 4e22953 iwinfo: export center_chan info for local wifi
 74d13fb cli: account for additional digit for frequencies above 10GHz
 8bfd8d8 iwinfo: add support for GCMP cipher
 618c1e8 iwinfo: add hardware description for QCA MIPS WiSoCs
 0702f32 iwinfo: improve center channel handling
 51c1336 iwinfo: set center chan unsupported for not-nl80211 driver
 23d2722 build: add ability to specify shared object version

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoscripts/feed: no warn on toolchain/linux overwrite
Paul Spooren [Sun, 27 Dec 2020 21:26:37 +0000 (11:26 -1000)]
scripts/feed: no warn on toolchain/linux overwrite

The recent 7f285d "scripts/feeds: warn when skipping core package
override" floods SDK output with warning of overwriting "linux" and
"toolchain" core packages. This should be ignored as these are not
regular packages added via feeds.

While at it slightly improve the warning string.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoipq806x: add space before SPDX identifier (again)
Adrian Schmutzler [Wed, 6 Jan 2021 22:53:25 +0000 (23:53 +0100)]
ipq806x: add space before SPDX identifier (again)

Strictly, an SPDX identifier requires a space between the comment
marker and the identifier itself. This has been addressed in
b69c21738e29 ("treewide: add space before SPDX identifier"), but
some new malformatted identifiers were merged recently.

This could have been prevented by using checkpatch.pl earlier.

Fixes: 1a775a4fd033 ("ipq806x: add support for TP-Link Talon AD7200")
Fixes: 8ddaeaf6424e ("ipq806x: create DTSI for TP-Link AD7200 and C2600")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoipq806x: improve model name and revision for TP-Link AD7200
Adrian Schmutzler [Wed, 6 Jan 2021 13:00:58 +0000 (14:00 +0100)]
ipq806x: improve model name and revision for TP-Link AD7200

The TP-Link AD7200 appears with and without the "Talon" model name
prefix. Let's use both variants for 'make menuconfig' so everybody
can locate the device.

Concerning the revision, the TP-Link page lists v1 and v2 with the
device currently marked as "End of Life". However, the v2 and latest
v1 firmware are byte-identical. Thus, we only need one image for
this device and do not need to include the revision in the image name.

While at it, remove the useless BOARD_NAME variable which only makes
sense in combination with upgrade from legacy stable versions or when
custom upgrade scripts are involved.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoipq806x: create DTSI for TP-Link AD7200 and C2600
Adrian Schmutzler [Wed, 6 Jan 2021 00:05:39 +0000 (01:05 +0100)]
ipq806x: create DTSI for TP-Link AD7200 and C2600

Both devices share most of their setup except buttons and LEDs,
so having a common DTSI removes a lot of duplicate code.

In order to have a shared partitioning scheme, device-id and
product-info from AD7200 have been merged into a single
product-info partition like for C2600.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoipq806x: clean up DTS file for TP-Link AD7200
Adrian Schmutzler [Tue, 5 Jan 2021 23:50:09 +0000 (00:50 +0100)]
ipq806x: clean up DTS file for TP-Link AD7200

This does several cosmetic adjustments for AD7200's DTS:

 - Make node name, DT label and label property consistent
 - Drop wrong and unused spi4 label
 - Use generic flash@0 node name

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoRevert "iwinfo: update to git HEAD"
Jo-Philipp Wich [Wed, 6 Jan 2021 12:41:51 +0000 (13:41 +0100)]
Revert "iwinfo: update to git HEAD"

This reverts commit f1620630e9f3407780ddc554361841f05c996c49.

This update introduces potentially remote exploitable buffer overreads
in IE parsing logic.

It also breaks the ABI without introdcing SOVERSION library versioning.

Furthermore, HT information is incorrectly added for non-HT BSSes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agoRevert "rpcd: update to git HEAD"
Jo-Philipp Wich [Wed, 6 Jan 2021 12:38:24 +0000 (13:38 +0100)]
Revert "rpcd: update to git HEAD"

This reverts commit 190e7939639846b86ab487c50169963382720e2b.

This update introduces a potential null-pointer deref with subsequent rpcd
crash when querying wireless info for non-nl80211 wdevs.

Additionally it wrongly includes ht frequency information for non-ht BSSes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agoramips: limit 5GHz channels for UniFi 6 Lite
David Bauer [Tue, 5 Jan 2021 23:00:01 +0000 (00:00 +0100)]
ramips: limit 5GHz channels for UniFi 6 Lite

The MT7915 radio currently advertises 2.4GHz channels while the antenna
path only supports 5 GHz. Limit the radio to 5GHz channels to prevent
users from configuring non-supported channels.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agorpcd: update to git HEAD
Daniel Golle [Tue, 5 Jan 2021 20:02:52 +0000 (20:02 +0000)]
rpcd: update to git HEAD

 fd017ba iwinfo: add ht and vht operation info to wifi scan
 4c66b31 iwinfo: export center channel for info ubus call
 e28d4a5 iwinfo: add support for 802.11ad and GCMP
 5c15f57 iwinfo: return hwmode 'ad' on 802.11ad-only hardware

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoiwinfo: update to git HEAD
Daniel Golle [Tue, 5 Jan 2021 20:04:22 +0000 (20:04 +0000)]
iwinfo: update to git HEAD

 a17f561 iwinfo: detect QCA IPQ4019 WiSoC from FDT
 ea28dfb iwinfo: export ht and vht operation in scan results
 4e22953 iwinfo: export center_chan info for local wifi
 74d13fb cli: account for additional digit for frequencies above 10GHz
 8bfd8d8 iwinfo: add support for GCMP cipher

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agorealtek: fix build issues
Birger Koblitz [Tue, 5 Jan 2021 19:40:52 +0000 (20:40 +0100)]
realtek: fix build issues

This fixes the build problems for the REALTEK target by adding a proper
configuration option for the phy module.

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
3 years agotools/fakeroot: update to 1.25.3
Syrone Wong [Fri, 1 Jan 2021 13:50:43 +0000 (21:50 +0800)]
tools/fakeroot: update to 1.25.3

use PKG_FIXUP:=autoreconf to generate configure
200-hide-dlsym-error.patch deleted due to fixed upstream in another way
other patches refreshed to reflect latest changes

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
3 years agoipq806x: fix LED names of TP-Link Talon AD2700
Daniel Golle [Tue, 5 Jan 2021 16:24:42 +0000 (16:24 +0000)]
ipq806x: fix LED names of TP-Link Talon AD2700

While the underscore in the name of the USB LEDs was removed from DTS,
/etc/board.d/01_leds also has to reflect that change.

Fixes: 28fd279e5d ("ipq806x: some corrections for TP-Link Talon AD7200")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>