openwrt/openwrt.git
3 years agoipq40xx: add testing support for kernel 5.10
Robert Marko [Sun, 12 Sep 2021 20:41:43 +0000 (22:41 +0200)]
ipq40xx: add testing support for kernel 5.10

Add kernel 5.10 as the testing kernel to ipq40xx to
get wider testing.

The following devices failed to build with buildbot settings and all
feeds installed (apparently due to kernel size):

 * cell-c rtl30vw
 * compex wpj428
 * devolo magic 2 next
 * engenius emr3500
 * glinet gl-b1300
 * glinet gl-s1300
 * qcom ap-dk01.1-c1
 * qcom ap-dk04.1-c1

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Tested-by: Nick Hainke <vincent@systemli.org> [ipq4019/fritzbox-7530
                                               ipq4019/fritzbox-4040
                                               ipq4019/sxtsq-5ac]
Tested-by: Szabolcs Hubai <szab.hu@gmail.com> [ipq4029/gl-b1300]
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq4019/map-ac2200]
[add tested-by and note about failed devices]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoipq40xx: 5.10: move AR40xx to MDIO drivers
Robert Marko [Sun, 12 Sep 2021 21:50:20 +0000 (23:50 +0200)]
ipq40xx: 5.10: move AR40xx to MDIO drivers

MDIO drivers were moved into their own sub directory of networking drivers.
This has caused the AR40xx driver to probe before MDIO drivers and that wont
work as it depends on the MDIO bus to be up so it can be fetched.

Lets solve it by moving the AR40xx into MDIO folder so they get probed like
before.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: net: ethernet: edma: reject unsupported coalescing params
Robert Marko [Sun, 12 Sep 2021 21:26:59 +0000 (23:26 +0200)]
ipq40xx: net: ethernet: edma: reject unsupported coalescing params

Set ethtool_ops->supported_coalesce_params to let
the core reject unsupported coalescing parameters.

This driver did not previously reject unsupported parameters.

This is a required ethtool op since kernel 5.7.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: net: ethernet: edma: update of_get_phy_mode() for 5.10
Robert Marko [Sun, 12 Sep 2021 21:00:51 +0000 (23:00 +0200)]
ipq40xx: net: ethernet: edma: update of_get_phy_mode() for 5.10

In kernel v5.5 of_get_phy_mode had its API changed, so its now returning 0
or errors instead of phymode.

Phymode is now returning by passing a pointer to phy_interface_t where it
will be stored.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: 5.10: add kernel config
Robert Marko [Sun, 12 Sep 2021 20:40:39 +0000 (22:40 +0200)]
ipq40xx: 5.10: add kernel config

Copy config from 5.4 and run "make kernel_oldconfig".

Select default ("N") for all new symbols.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
[make commit message more explicit]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoipq40xx: 5.10: refresh patches to apply
Robert Marko [Sun, 12 Sep 2021 20:36:12 +0000 (22:36 +0200)]
ipq40xx: 5.10: refresh patches to apply

Refresh the kernel patches on top of 5.10 so they apply.
Manually fixup the 705-net-add-qualcomm-ar40xx-phy.patch
to apply.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: 5.10: replace patches with upstreamed versions
Robert Marko [Sun, 12 Sep 2021 20:34:43 +0000 (22:34 +0200)]
ipq40xx: 5.10: replace patches with upstreamed versions

USB and SDHCI LDO DTS patches have been upstreamed into 5.12, so
replace the local versions with upstreamed ones.

Reorder, and clearly mark the kernel version.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: 5.10: remove duplicate GPIO export patch
Robert Marko [Sun, 12 Sep 2021 20:33:36 +0000 (22:33 +0200)]
ipq40xx: 5.10: remove duplicate GPIO export patch

Its in the generic target already, so remove the duplicate
as it breaks compilation.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: 5.10: drop upstreamed patches
Robert Marko [Sun, 12 Sep 2021 20:20:55 +0000 (22:20 +0200)]
ipq40xx: 5.10: drop upstreamed patches

Drop patches that have been upstreamed in before 5.10.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoipq40xx: 5.10: copy patches
Robert Marko [Mon, 13 Sep 2021 12:08:35 +0000 (14:08 +0200)]
ipq40xx: 5.10: copy patches

Copy over the 5.4 kernel patches to 5.10 folder.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agoramips: add support for I-O DATA WN-DX2033GR
INAGAKI Hiroshi [Sat, 18 Sep 2021 12:39:04 +0000 (21:39 +0900)]
ramips: add support for I-O DATA WN-DX2033GR

I-O DATA WN-DX2033GR is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on
MT7621A.

Specification:

- SoC : MediaTek MT7621A
- RAM : DDR3 128 MiB
- Flash : Raw NAND 128 MiB (Macronix MX30LF1G18AC-TI)
- WLAN : 2.4/5 GHz
  - 2.4 GHz : 2T2R, MediaTek MT7603E
  - 5 GHz : 4T4R, MediaTek MT7615
- Ethernet : 5x 10/100/1000 Mbps
  - Switch : MediaTek MT7530 (SoC)
- LEDs/Keys : 2x/3x (2x buttons, 1x slide-switch)
- UART : through-hole on PCB
  - J5: 3.3V, TX, RX, NC, GND from triangle mark
  - 57600n8
- Power : 12 VDC, 1 A

Flash instruction using initramfs image:

1. Boot WN-DX2033GR normally
2. Access to "http://192.168.0.1/" and open firmware update page
   ("ファームウェア")
3. Select the OpenWrt initramfs image and click update ("更新") button
   to perform firmware update
4. On the initramfs image, download the sysupgrade.bin image to the
   device and perform sysupgrade with it
5. Wait ~120 seconds to complete flashing

Notes:

- The hardware of WN-DX2033GR and WN-AX2033GR are almost the same, and
  it is certified under the same radio-wave related regulations in Japan

- The last 0x80000 (512 KiB) in NAND flash is not used on stock firmware

- stock firmware requires "customized uImage header" (called as "combo
  image") by MSTC (MitraStar Technology Corp.), but U-Boot doesn't

  - uImage magic ( 0x0 - 0x3 ) : 0x434F4D42 ("COMB")
  - header crc32 ( 0x4 - 0x7 ) : with "data length" and "data crc32"
  - image name   (0x20 - 0x37) : model ID and firmware versions
  - data length  (0x38 - 0x3b) : kernel + rootfs
  - data crc32   (0x3c - 0x3f) : kernel + rootfs

- There are 2x important flags in the flash:

  - bootnum   : select os partition for booting (persist, 0x4)

    - 0x01: firmware
    - 0x02: firmware_2

  - debugflag : allow interrupt kernel loader, it's named as "Z-LOADER"
    (Factory, 0xFE75)

    - 0x00: disable debug
    - 0x01: enable debug

MAC addresses:

LAN     : 50:41:B9:xx:xx:90 (Factory, 0xE000 (hex) / Ubootenv, ethaddr (text))
WAN     : 50:41:B9:xx:xx:92 (Factory, 0xE006 (hex))
2.4 GHz : 50:41:B9:xx:xx:90 (Factory, 0x4    (hex))
5 GHz   : 50:41:B9:xx:xx:91 (Factory, 0x8004 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agorealtek: fix RTL8231 gpio expander for high GPIOs
Paul Fertser [Mon, 20 Sep 2021 17:13:35 +0000 (20:13 +0300)]
realtek: fix RTL8231 gpio expander for high GPIOs

GPIOs > 31 require special handling. This patch fixes both the
initialisation and direction get/set operations.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Sander Vanheule <sander@svanheule.net>
3 years agokernel: add patch to fix an issue with kernel headers that broke perf
Felix Fietkau [Sat, 25 Sep 2021 11:52:07 +0000 (13:52 +0200)]
kernel: add patch to fix an issue with kernel headers that broke perf

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agotools/fakeroot: fix build error on macOS
Felix Fietkau [Fri, 24 Sep 2021 16:38:24 +0000 (18:38 +0200)]
tools/fakeroot: fix build error on macOS

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: backport support for BSS color changes
Felix Fietkau [Fri, 24 Sep 2021 14:53:33 +0000 (16:53 +0200)]
mac80211: backport support for BSS color changes

This is needed for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agoramips: add missing information to dlink headers
Alan Luck [Tue, 20 Apr 2021 09:44:01 +0000 (19:44 +1000)]
ramips: add missing information to dlink headers

Add additional header information required for newer
bootloaders found on DIR-2660-A1 & A2.

Also remove the MTD splitter compatible from the second firmware
partition, as OpenWrt only supports handling of the first one.

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
[rephrase commit message, remove removal of read-only flags]
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agohostapd: fix segfault when deinit mesh ifaces
Jesus Fernandez Manzano [Tue, 21 Sep 2021 10:49:30 +0000 (12:49 +0200)]
hostapd: fix segfault when deinit mesh ifaces

In hostapd_ubus_add_bss(), ubus objects are not registered for mesh
interfaces. This provokes a segfault when accessing the ubus object in
mesh deinit.

This commit adds the same condition to hostapd_ubus_free_bss() for
discarding those mesh interfaces.

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.net>
3 years agorockchip: fix broken squashfs sysupgrade
David Bauer [Thu, 23 Sep 2021 19:01:37 +0000 (21:01 +0200)]
rockchip: fix broken squashfs sysupgrade

The rockchip platform supports squashfs SD card images. However, the
resulting image is not padded to completely fill the rootfs partition.

Because of that, the f2fs overlay might not be erased, resulting in
uci-defaults not bing executed or the configuration not being erased,
even though drop config was selected.

Modify the image generation process so the image is padded to cover the
entire root filesystem partition.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoscripts: package-metadata add pkgmanifestjson call
Paul Spooren [Fri, 17 Sep 2021 22:00:40 +0000 (12:00 -1000)]
scripts: package-metadata add pkgmanifestjson call

The new `pkgmanifestjson` call prints all package manifest of a feed in
JSON format. This function can be used to print an overview of packages
information used for downstream tooling.

The script is entirely based on Petrs work on dependency visualisation.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agobcm47xx: use device vendor/model variable
Moritz Warning [Wed, 5 May 2021 09:06:22 +0000 (11:06 +0200)]
bcm47xx: use device vendor/model variable

Remove use of DEVICE_TITLE in favor of the
DEVICE_VENDOR and DEVICE_MODEL as used by
all other targets.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
3 years agox86: use device vendor/model variable
Moritz Warning [Tue, 4 May 2021 19:15:13 +0000 (21:15 +0200)]
x86: use device vendor/model variable

Remove use of DEVICE_TITLE in favor of the
DEVICE_VENDOR and DEVICE_MODEL as used by
all other targets.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
3 years agobase-files: reduce number of `mkdir` calls
Paul Spooren [Sun, 12 Sep 2021 08:46:06 +0000 (22:46 -1000)]
base-files: reduce number of `mkdir` calls

The `mkdir` commands supports passing multiple arguments to batch create
multiple folders, instead of calling the tool every single time.

If the creation of one of the folders fails, all other folder are still
created and therefore doesn't change the error handling.

Also stop creating `/etc/` explicitly after subfolders of `/etc/` were
already created.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agobase-files: reduce `sed` calls
Paul Spooren [Sun, 12 Sep 2021 08:44:11 +0000 (22:44 -1000)]
base-files: reduce `sed` calls

The `sed`-script shouldn't be called multiple times, especially not with
the same files.

This commit merges all files together in a single `sed`-script call.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoscripts: store maintainer in package metadata
Paul Spooren [Fri, 17 Sep 2021 09:51:50 +0000 (23:51 -1000)]
scripts: store maintainer in package metadata

The maintainer could be usable for downstream tooling, so start storing
it in the metadata.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoimagebuilder: show architecture in `make info` output
Paul Spooren [Fri, 24 Sep 2021 04:46:15 +0000 (18:46 -1000)]
imagebuilder: show architecture in `make info` output

Using `make info` show the current target, revision, default packages
and available profiles. This commits adds the used architecture.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agorestool: add back PKG_VERSION
Rosen Penev [Thu, 23 Sep 2021 19:48:37 +0000 (12:48 -0700)]
restool: add back PKG_VERSION

For some reason, the build system chops off the last number from the version,
which is not correct. Add it back.

Update hash.

Fixes: 96c7164acd80 ("restool: update to LSDK-20.12")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
[add Fixes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoipq-wifi: Work around Plasma Cloud PA1200 5GHz crash
Sven Eckelmann [Wed, 22 Sep 2021 15:56:30 +0000 (17:56 +0200)]
ipq-wifi: Work around Plasma Cloud PA1200 5GHz crash

It was noticed [1] that the ath10k firmware crashes on 5GHz since OpenWrt
21.02.0. The problem seems to be triggered by the the nonLinearTxFir field
in the 5GHz BDF. If baseEepHeader.nonLinearTxFir (offset 0xc2) is 1 then
the firmware just crashes when setting up the 5Ghz radio using `ifconfig
wlan1 up`:

  ath10k_ahb a800000.wifi: firmware crashed! (guid 9e36ee82-4d2c-4c63-b20b-609a1eaca30c)
  ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
  ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
  ath10k_ahb a800000.wifi: firmware ver 10.4-3.6-00140 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps crc32 ba79b746
  ath10k_ahb a800000.wifi: board_file api 2 bmi_id 0:17 crc32 5f400efc
  ath10k_ahb a800000.wifi: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 512 raw 0 hwcrypto 1
  ath10k_ahb a800000.wifi: firmware register dump:
  ath10k_ahb a800000.wifi: [00]: 0x0000000B 0x000015B3 0x009C3C27 0x00975B31
  ath10k_ahb a800000.wifi: [04]: 0x009C3C27 0x00060530 0x00000018 0x004176B8
  ath10k_ahb a800000.wifi: [08]: 0x00405A50 0x00412A30 0x00000000 0x00000000
  ath10k_ahb a800000.wifi: [12]: 0x00000009 0x00000000 0x009B9742 0x009B974F
  ath10k_ahb a800000.wifi: [16]: 0x00971238 0x009B9742 0x00000000 0x00000000
  ath10k_ahb a800000.wifi: [20]: 0x409C3C27 0x004053DC 0x00000D2C 0x00405A60
  ath10k_ahb a800000.wifi: [24]: 0x809C3E13 0x0040543C 0x00000000 0xC09C3C27
  ath10k_ahb a800000.wifi: [28]: 0x809B9AC5 0x0040547C 0x00412A30 0x0040549C
  ath10k_ahb a800000.wifi: [32]: 0x809B8ECD 0x0040549C 0x00000001 0x00412A30
  ath10k_ahb a800000.wifi: [36]: 0x809B8FF3 0x004054CC 0x00412838 0x00000014
  ath10k_ahb a800000.wifi: [40]: 0x809BEF98 0x0040551C 0x0041627C 0x00000002
  ath10k_ahb a800000.wifi: [44]: 0x80986D47 0x0040553C 0x0041627C 0x00416A88
  ath10k_ahb a800000.wifi: [48]: 0x809CBB0A 0x0040559C 0x0041ACC0 0x00000000
  ath10k_ahb a800000.wifi: [52]: 0x809864EE 0x0040560C 0x0041ACC0 0x00000001
  ath10k_ahb a800000.wifi: [56]: 0x809CA8A4 0x0040564C 0x0041ACC0 0x00000001
  ath10k_ahb a800000.wifi: Copy Engine register dump:
  ath10k_ahb a800000.wifi: [00]: 0x0004a000  14  14   3   3
  ath10k_ahb a800000.wifi: [01]: 0x0004a400  16  16  22  23
  ath10k_ahb a800000.wifi: [02]: 0x0004a800   3   3   2   3
  ath10k_ahb a800000.wifi: [03]: 0x0004ac00  15  15  15  15
  ath10k_ahb a800000.wifi: [04]: 0x0004b000   4   4  44   4
  ath10k_ahb a800000.wifi: [05]: 0x0004b400   3   3   2   3
  ath10k_ahb a800000.wifi: [06]: 0x0004b800   1   1   1   1
  ath10k_ahb a800000.wifi: [07]: 0x0004bc00   1   1   1   1
  ath10k_ahb a800000.wifi: [08]: 0x0004c000   0   0 127   0
  ath10k_ahb a800000.wifi: [09]: 0x0004c400   0   0   0   0
  ath10k_ahb a800000.wifi: [10]: 0x0004c800   0   0   0   0
  ath10k_ahb a800000.wifi: [11]: 0x0004cc00   0   0   0   0
  ath10k_ahb a800000.wifi: failed to update channel list: -108
  ath10k_ahb a800000.wifi: failed to set pdev regdomain: -108
  ath10k_ahb a800000.wifi: failed to create WMI vdev 0: -108
  ieee80211 phy1: Hardware restart was requested

Since no actual solution is known (besides downgrading the ath10k firmware)
it seems to be better to disable the nonLinearTxFir for now.

[1] https://lore.kernel.org/ath10k/3423718.UToCqzeSYe@ripper/

Signed-off-by: Sven Eckelmann <sven@narfation.org>
3 years agoipq-wifi: Update Plasma Cloud PA1200 BDFs to firmware 3.5.12
Sven Eckelmann [Wed, 22 Sep 2021 15:56:30 +0000 (17:56 +0200)]
ipq-wifi: Update Plasma Cloud PA1200 BDFs to firmware 3.5.12

The official Plasma Cloud firmware adjusted the BDFs to contain new
conformance test limits and target power values. These should be imported
to avoid emissions outside the allowed limits.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
3 years agobcm53xx: MR32: read mac-address from eeprom
Christian Lamparter [Sat, 18 Sep 2021 14:41:41 +0000 (16:41 +0200)]
bcm53xx: MR32: read mac-address from eeprom

Meraki wrote the ethernet MAC-address of the device
onto the eeprom (AT24C64) at the fixed location 0x66
to 0x6C. Let's fetch it from there.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
3 years agoscripts: mkits.sh: Allow legacy @ mode for dts creation
Damien Mascord [Mon, 19 Jul 2021 04:21:44 +0000 (14:21 +1000)]
scripts: mkits.sh: Allow legacy @ mode for dts creation

commit 5ec60cbe9d94 ("scripts: mkits.sh: replace @ with - in nodes")
broke support for Meraki MR32 and this patch makes the replacement
configurable allowing for specifying the @ or - or whatever character
that is desired to retain backwards compatibility with existing devices.

For example, this patch includes the fix for the Meraki MR32 in
target/linux/bcm53xx/image for meraki_mr32:

  DEVICE_DTS_DELIMITER := @
  DEVICE_DTS_CONFIG := config@1

Fixes: 5ec60cbe9d94 ("scripts: mkits.sh: replace @ with - in nodes")
Signed-off-by: Damien Mascord <tusker@tusker.org>
[Added tags, checkpatch.pl fixes, noted that this is for old stuff]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
3 years agolibtool: Revert "libtool: bump to 2.4.6"
Hauke Mehrtens [Thu, 23 Sep 2021 11:36:45 +0000 (13:36 +0200)]
libtool: Revert "libtool: bump to 2.4.6"

This breaks the package builds using the SDK.
The targets all build fine, but the package builder fails on many
packages. The package builder uses the OpenWrt SDK.

This reverts commit c377d874bededfad971530aeb7d7e1b43cd3e61a.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agoscripts: handle gcc and linux in dl_cleanup script
Ansuel Smith [Tue, 6 Jul 2021 01:53:58 +0000 (03:53 +0200)]
scripts: handle gcc and linux in dl_cleanup script

Handle gcc and linux with a special regex that set their progname with
their major version. This way every minor version can be cleared. The
build cleanup logic can be tweaked later to clean the entire toolchain
and target dir with a different gcc version.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[reformat commit message]
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agobcm53xx: backport early DT patches queued for 5.16
Rafał Miłecki [Wed, 22 Sep 2021 20:01:10 +0000 (22:01 +0200)]
bcm53xx: backport early DT patches queued for 5.16

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agoscripts: format dl_cleanup to black format python style
Ansuel Smith [Tue, 6 Jul 2021 01:20:40 +0000 (03:20 +0200)]
scripts: format dl_cleanup to black format python style

Forma dl_cleanup python script to black style.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
3 years agoscripts: add missing regex for dl_cleanup script
Ansuel Smith [Mon, 5 Jul 2021 22:56:21 +0000 (00:56 +0200)]
scripts: add missing regex for dl_cleanup script

Regex xxx-YYYY-MM-DD-GIT_SHASUM was missing. Add the new regex to improve
and better find outdated package. This also fix a bug where some bug were
incorrectly detected as packagename-yyyy-mm-dd instead of packagename due
to them be parsed by the wrong parser

Example:

    openwrt-keyring-2021-02-20-49283916.tar.xz

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[added example in commit message]
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agotoolchain/binutils: switch to version 2.37 by default
Paul Spooren [Wed, 22 Sep 2021 01:14:40 +0000 (15:14 -1000)]
toolchain/binutils: switch to version 2.37 by default

Compile tests:
* all

Runtime tests:
* ipq806x/generic
* lantiq/mt7621
* lantiq/xrx200
* x86/64

Signed-off-by: Paul Spooren <mail@aparcar.org>
Tested-by: Paul Spooren <mail@aparcar.org>
Tested-by: Rosen Penev <rosenp@gmail.com>
Tested-by: Andre Heider <a.heider@gmail.com>
Tested-by: Ansuel Smith <ansuelsmth@gmail.com>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agofstools: ensure filesystems are mounted before log service starts
Timo Sigurdsson [Sat, 26 Jun 2021 11:04:49 +0000 (13:04 +0200)]
fstools: ensure filesystems are mounted before log service starts

Currently, the fstab service starts after the log service which breaks
the ability to write a persistent log file to a filesystem mounted by
the fstab service. Thus, change the start order of the fstab service so
it starts right before the log service.

Fixes: b131853 ("ubox: update to latest git revision")
Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de>
[set to 11 to be explicitly before log, not only alphabetically, SPDX]
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agomac80211: Update to backports-5.10.68
Hauke Mehrtens [Tue, 14 Sep 2021 21:58:44 +0000 (23:58 +0200)]
mac80211: Update to backports-5.10.68

Refresh all patches.
The removed patches were integrated upstream.

This contains fixes for CVE-2020-3702

1. These patches (ath, ath9k, mac80211)  were included in kernel
versions since 4.14.245 and 4.19.205. They fix security vulnerability
CVE-2020-3702 [1] similar to KrØØk, which was found by ESET [2].

Thank you Josef Schlehofer for reporting this problem.

[1] https://nvd.nist.gov/vuln/detail/CVE-2020-3702
[2] https://www.welivesecurity.com/2020/08/06/beyond-kr00k-even-more-wifi-chips-vulnerable-eavesdropping/

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agotoolchain/musl: Remove extra format attribute patch
Hauke Mehrtens [Thu, 9 Sep 2021 18:36:51 +0000 (20:36 +0200)]
toolchain/musl: Remove extra format attribute patch

This patch never went upstream so remove it. GCC should already add such
a check to the common functions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agobpftools: fix compilation with musl 1.2.x
Rosen Penev [Wed, 25 Nov 2020 01:32:34 +0000 (17:32 -0800)]
bpftools: fix compilation with musl 1.2.x

A definition for __maybe_inline is needed.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotoolchain/musl: remove several GNU headers
Rosen Penev [Fri, 20 Mar 2020 01:31:17 +0000 (18:31 -0700)]
toolchain/musl: remove several GNU headers

Remove GLOB_ONLYDIR patch. Only fstools relies on it. fstools has been
fixed separately.

Remove woresize.h file. It seems to be for an old version of GCC.

Remove features.h and glibc-types files. Same as above.

Remove sys/cdefs.h. This is a deprecated header. Patches to fix packages
that use it have already been patched.

Tested with all packages in the base tree. They all compile.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotoolchain/musl: update to 1.2.2
Rosen Penev [Fri, 20 Mar 2020 01:31:17 +0000 (18:31 -0700)]
toolchain/musl: update to 1.2.2

This release introduces 64-bit time_t, which is needed to avoid the
year 2038 problem.

Remove upstream patches. Refreshed others.

Rebased features.h file based on latest musl.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotoolchain/gcc: switch to version 11 by default
Paul Spooren [Sun, 19 Sep 2021 09:16:59 +0000 (23:16 -1000)]
toolchain/gcc: switch to version 11 by default

gcc10 seem to increase build size and gcc11 seem to fix that.

Compile tests:
* all

Runtime tests:
* ath79
* mpx85xx/p2020
* mvebu
* x86/64

Special thanks to Rosen for fixing layerscape & bcm63xx

Signed-off-by: Paul Spooren <mail@aparcar.org>
Reviewed-by: Rui Salvaterra <rsalvaterra@gmail.com
Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Rui Salvaterra <rsalvaterra@gmail.com
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
Tested-by: Pawel Dembicki <paweldembicki@gmail.com>
Tested-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
3 years agotfp-layerscape: update to LSDK-20.12
Rosen Penev [Mon, 20 Sep 2021 02:30:37 +0000 (19:30 -0700)]
tfp-layerscape: update to LSDK-20.12

Fixes compilation with GCC11.

Kept PKG_VERSION as there's some bug that chops off the 12 at the end.

Refreshed other patch.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agorestool: update to LSDK-20.12
Rosen Penev [Mon, 20 Sep 2021 02:43:41 +0000 (19:43 -0700)]
restool: update to LSDK-20.12

Fixes compilation with both GCC 10 and 11.

Switched to AUTORELEASE for simplicity.

Removed PKG_VERSION as it's derived from PKG_SOURCE_VERSION.

Removed all patches as they are upstream backports.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agobcm63xx: remove memcpy from mac assignment
Rosen Penev [Tue, 21 Sep 2021 02:23:58 +0000 (19:23 -0700)]
bcm63xx: remove memcpy from mac assignment

With GCC11, memcpy doesn't work here as it assumes a size of 0. Use
ioremap to avoid it.

Fixed parameter type to match board_get_mac_address.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotoolchain/gcc: cleanup gcc9 config option
Paul Spooren [Wed, 22 Sep 2021 01:06:33 +0000 (15:06 -1000)]
toolchain/gcc: cleanup gcc9 config option

This line should have been removed in 244847da "build: remove GCC9
support" but stayed in tree after an incomplete rebase. Fix it.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years ago6rd: delete tunnel on interface teardown
David Lam [Mon, 20 Sep 2021 05:42:14 +0000 (22:42 -0700)]
6rd: delete tunnel on interface teardown

Delete tunnel on 6rd interface teardown.
Should solve problem related to tunnel stuck on restart loop
with "Unknown Command" on tunnel restart due to wan connection drop.

This patch is similar to the one written by Ansuel on Aug 2, 2021
but the 6rd teardown produces the same symptoms when the network
service is restarted.

Signed-off-by: David Lam <david@thedavid.net>
3 years agorestool: fix compilation with GCC 10
Kuan-Yi Li [Fri, 17 Sep 2021 06:27:47 +0000 (14:27 +0800)]
restool: fix compilation with GCC 10

GCC 10 defaults to `-fno-common` and complains about multiple definition
of `mc_status` in restool.

Backport a patch from upstream to fix compilation with host GCC 10.

Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
3 years agohostapd: let netifd set bridge port attributes for snooping
Felix Fietkau [Wed, 1 Sep 2021 17:12:27 +0000 (19:12 +0200)]
hostapd: let netifd set bridge port attributes for snooping

Avoids race conditions on bridge member add/remove

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agoustp: update to the latest version
Felix Fietkau [Fri, 27 Aug 2021 10:38:12 +0000 (12:38 +0200)]
ustp: update to the latest version

c62d85cf7a0d bridge: check port bpdu filter status and apply it to the config
25555611be91 libnetlink: turn rtnetlink error answers into debug msgs
462b3a491347 build: use pthread cflags/ldflags

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agonetifd: update to the latest version
Felix Fietkau [Fri, 27 Aug 2021 10:33:37 +0000 (12:33 +0200)]
netifd: update to the latest version

d590fbd255ce wireless: always enable bpdu filter for AP interfaces and VLANs
f8ff6d820283 system-linux: remove copy&paste from /proc and /sys path names
300b1220fab3 wireless: improve reliability of proxyarp support
5ba9744aac6d device: add support for configuring bonding devices
6fa9b042ff4d wireless: only apply wireless device attributes to the base vif interface
06d11bbf1f2b wireless: only enable proxyarp/isolate for AP vifs
08e954e137ff bonding: claim the port device before creating the bonding device

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agokernel: add a bridge feature for filtering BPDU packets on ports
Felix Fietkau [Fri, 27 Aug 2021 10:32:00 +0000 (12:32 +0200)]
kernel: add a bridge feature for filtering BPDU packets on ports

This will be used to ensure that APs don't transmit unnecessary STP packets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agoarm-trusted-firmware-mvebu: Add hash for aarch64 cm3-gcc
Hauke Mehrtens [Wed, 15 Sep 2021 12:42:43 +0000 (14:42 +0200)]
arm-trusted-firmware-mvebu: Add hash for aarch64 cm3-gcc

This adds the hash also for the aarch64 toolchain in addition to the
x86_64 toolchain. This gets the build on a Linux aarch64 host one step
further.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agolibtool: bump to 2.4.6
Eneas U de Queiroz [Mon, 13 Sep 2021 21:08:55 +0000 (18:08 -0300)]
libtool: bump to 2.4.6

This updates libtool to its current release, from 2015.  Current patches
were renumbered and given a description text.  The fix in
160-passthrough-ssp.patch is no longer needed.

A patch to speed up build was cherry-picked, and another openwrt
specific patch was needed to not use quotes in $(SHELL), to acommodate
our "SHELL=/usr/bin/env bash" usage.

The already present call to ./bootstrap ensures that generated files are
refreshed, so the patches are applied only to their sources.  Also, that
bootstrap call was adjusted to run at the appropriate time when QUILT=1.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
3 years agotools/e2fsprogs: update to 1.46.4
Rosen Penev [Sat, 18 Sep 2021 08:09:29 +0000 (01:09 -0700)]
tools/e2fsprogs: update to 1.46.4

Refresh patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotools/autoconf-archive: update to 2021.02.19
Rosen Penev [Sat, 18 Sep 2021 08:02:51 +0000 (01:02 -0700)]
tools/autoconf-archive: update to 2021.02.19

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotools/sstrip: update to 3.2
Rosen Penev [Sat, 18 Sep 2021 07:57:24 +0000 (00:57 -0700)]
tools/sstrip: update to 3.2

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotools/sparse: update to 0.6.4
Rosen Penev [Sat, 18 Sep 2021 07:42:03 +0000 (00:42 -0700)]
tools/sparse: update to 0.6.4

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotools/mtools: update to 4.0.35
Rosen Penev [Sat, 18 Sep 2021 07:40:41 +0000 (00:40 -0700)]
tools/mtools: update to 4.0.35

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotools/m4: update to 1.4.19
Rosen Penev [Thu, 4 Mar 2021 02:00:26 +0000 (18:00 -0800)]
tools/m4: update to 1.4.19

Remove upstreamed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotools/fakeroot: update to 1.26
Rosen Penev [Sat, 18 Sep 2021 07:20:45 +0000 (00:20 -0700)]
tools/fakeroot: update to 1.26

Remove upstreamed patches. Refresh other.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotools/bison: update to 3.8.1
Rosen Penev [Sat, 18 Sep 2021 07:10:56 +0000 (00:10 -0700)]
tools/bison: update to 3.8.1

Remove upstreamed patch.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agobuild: remove GCC7 support
Paul Spooren [Sun, 19 Sep 2021 09:30:30 +0000 (23:30 -1000)]
build: remove GCC7 support

The development branch is now on version 10, we shouldn't drag to many
old versions and therefore drop at least 7.x.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Rui Salvaterra <rsalvaterra@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
3 years agobuild: remove GCC9 support
Paul Spooren [Sun, 19 Sep 2021 09:38:16 +0000 (23:38 -1000)]
build: remove GCC9 support

gcc9 was never used within a release and the development branch is
already on version 10, no need to keep this in tree.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Rui Salvaterra <rsalvaterra@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
3 years agoiproute2: update to 5.14
Hans Dedecker [Sat, 11 Sep 2021 19:17:39 +0000 (21:17 +0200)]
iproute2: update to 5.14

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

Refresh patches

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agokernel: add missing CONFIG_NET_DSA_TAG_BRCM_LEGACY config symbol
Rafał Miłecki [Fri, 17 Sep 2021 20:05:47 +0000 (22:05 +0200)]
kernel: add missing CONFIG_NET_DSA_TAG_BRCM_LEGACY config symbol

This fixes:
Distributed Switch Architecture (NET_DSA) [Y/n/m/?] y
  Tag driver for Atheros AR9331 SoC with built-in switch (NET_DSA_TAG_AR9331) [N/m/y/?] n
  Tag driver for Broadcom switches using in-frame headers (NET_DSA_TAG_BRCM) [N/m/y/?] n
  Tag driver for Broadcom legacy switches using in-frame headers (NET_DSA_TAG_BRCM_LEGACY) [N/m/y/?] (NEW)
Error in reading or end of file.

Fixes: 8fa1b576bbb5 ("linux: update b53 upstream driver")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agolinux: update b53 upstream driver
Rafał Miłecki [Fri, 17 Sep 2021 08:07:22 +0000 (10:07 +0200)]
linux: update b53 upstream driver

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agotools/pkgconf: update to 1.8.0
Rosen Penev [Sat, 19 Jun 2021 02:53:17 +0000 (19:53 -0700)]
tools/pkgconf: update to 1.8.0

Switch to compiling with meson for faster and more reliable compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotools: add meson
Rosen Penev [Thu, 17 Jun 2021 21:21:44 +0000 (14:21 -0700)]
tools: add meson

meson is a next generation build system designed to have good defaults,
simpler build files, and fast compilation.

It is built upon python and uses ninja for compilation. The latter
provides fast by default (parallel) and problem free compilation.

There are over 40 packages already successfully using meson. The next
commit will convert pkgconf to use meson compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotools/mm-macros: remove
Rosen Penev [Thu, 16 Sep 2021 05:27:43 +0000 (22:27 -0700)]
tools/mm-macros: remove

ccaaab1c048159611e93a181dde740f49fa12483 says that this is in the
codebase because of libsigc++, which is not in the codebase anymore.
Neither in base nor in packages. It doesn't seem to be needed by
anything else either. GNOME packages have transitioned to using meson,
which does not use m4 files.

Tested local compile with CONFIG_ALL. No problems seen.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agobcm53xx: drop DTS based workaround for serial support in procd
Rafał Miłecki [Thu, 16 Sep 2021 05:51:30 +0000 (07:51 +0200)]
bcm53xx: drop DTS based workaround for serial support in procd

Specifying serial in bootargs is not needed since the commit
ffeb37047e85 ("procd: update to git HEAD"). It's thanks to the procd
commit 2cfc26f8456a ("inittab: detect active console from kernel if no
console= specified").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agoprocd: update to git HEAD
Daniel Golle [Wed, 15 Sep 2021 20:46:17 +0000 (21:46 +0100)]
procd: update to git HEAD

 8a60e7e trace: don't leak file descriptor in error path
 68df9ac procd: fix container deletion
 f16abe0 uxc: add JSON output option for 'list' command
 a23c888 jail: prepare for adding process to existing namespace
 50da8a4 instance: allow jailed service to join namespace(s)
 482d1ab Revert "jail: do not hack /etc/resolv.conf on container rootfs"
 1eb4371 jail: start ubus and netifd instances for container with netns

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agosunxi: add testing Linux 5.10
Daniel Golle [Tue, 14 Sep 2021 23:20:08 +0000 (00:20 +0100)]
sunxi: add testing Linux 5.10

Add testing Linux kernel 5.10 for sunxi targets.

Removed patches were replaced by upstream commits:

- 410-v5.6-arm64-dts-allwinner-a64-olinuxino-Add-bank-supply-re.patch
   f0c3b29f56f0a arm64: dts: allwinner: a64: olinuxino: Add bank supply regulators

- 420-v5.7-arm64-dts-allwinner-a64-olinuxino-add-user-red-LED.patch
   89866b2667e0d arm64: dts: allwinner: a64: olinuxino: add user red LED

- 440-add-h6-pwm.patch
   a7fe985633f92 pwm: sun4i: Add an optional probe for reset line
   b8d74644f34a8 pwm: sun4i: Prefer "mod" clock to unnamed
   5b090b430d750 pwm: sun4i: Add an optional probe for bus clock
   fa4d81784681a pwm: sun4i: Always calculate params when applying new parameters
   9f28e95b5286f pwm: sun4i: Add support to output source clock directly
   fdd2c12e3761f pwm: sun4i: Add support for H6 PWM

- 441-arm64-dts-add-PWM-node.patch
   88432f5f8469b arm64: dts: allwinner: h6: Add PWM node

- 443-board-h6-orangepioneplus-fix-missing-ethernet.patch
   7ee32a17e0d65 arm64: dts: allwinner: h6: orangepi-one-plus: Enable ethernet

Run tested on friendlyarm,nanopi-neo (allwinner,sun8i-h3), looks all good.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agosunxi: bring up DSA b53 switch on Lamobo R1
Daniel Golle [Fri, 10 Sep 2021 22:02:15 +0000 (23:02 +0100)]
sunxi: bring up DSA b53 switch on Lamobo R1

Build cortexa7 subtarget with DSA driver for MDIO-connected Broadcom
BCM53xxx switches. This is needed for the Lamobo R1 aka. BananaPi
BPi-R1 board which comes with such a switch IC.

Remove old swconfig driver from target kernel config as the only board
using it is now supported by the DSA driver.

No changes to device tree are needed as upstream DTS already got a
DSA switch definition and we are just using that upstream source.

Update default network config of the Lamobo R1 to create lan bridge
with all 4 lan ports.

Introduce DEVICE_COMPAT_VERSION for the board to inform users about
having the re-create their network configuration and add device alias
as Bananapi BPi-R1 while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoarm-trusted-firmware-mvebu: CZ.NIC's Secure Firmware bump to v2021.09.07
sean lee [Tue, 14 Sep 2021 08:50:20 +0000 (16:50 +0800)]
arm-trusted-firmware-mvebu: CZ.NIC's Secure Firmware bump to v2021.09.07

bump version and remove patches that have been applied

176d701 wtmi: Wait 1s after putting PHYs INTn pin low
2eeccfe wtmi: Change comment describing reset workaround
e8c94a5 wtmi: Count RAM size from both CS0 and CS1
995979e wtmi: Rename macro
e29eb29 wtmi: soc: Fix start_ap_workaround() for TF-A with debug
81245ed wtmi: Use constant name PLAT_MARVELL_MAILBOX_BASE
18ccb83 wtmi: Do a proper UART reset with clock change as described in spec
15ff106 avs: Validate VDD value from OTP
3f33626 fix: clock: a3700: change pwm clock for 600/600 and 1200/750 preset
fb5e436 wtmi: uart: fix UART baudrate divisor calculation

Signed-off-by: sean lee <ilf@live.com>
3 years agobuild: store artifacts in JSON
Paul Spooren [Mon, 13 Sep 2021 09:44:04 +0000 (23:44 -1000)]
build: store artifacts in JSON

Multiple profiles create artifacts, these should be stored in the JSON
file as well, allowing downstream tooling to show those files, too.

Artifacts don't have specific filesystems so only the fields `name`,
`type` and `sha256` are available.

Rename env variable names from IMAGE_ to FILE_ prefixes to reflect that
images, kernels and artifacts are added with the same command.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agodnsmasq: add config option for connmark DNS filtering
Etan Kissling [Thu, 9 Sep 2021 05:43:31 +0000 (05:43 +0000)]
dnsmasq: add config option for connmark DNS filtering

This adds uci support to configure connmark based DNS filtering.

Signed-off-by: Etan Kissling <etan_kissling@apple.com>
(imported from upstream mailing list
https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2021q2/015151.html)
Signed-off-by: Etan Kissling <etan.kissling@gmail.com>
3 years agodnsmasq: Update to version 2.86
Etan Kissling [Thu, 9 Sep 2021 05:42:33 +0000 (05:42 +0000)]
dnsmasq: Update to version 2.86

Summary of upstream CHANGELOG:
* Handle DHCPREBIND requests in the DHCPv6 server code.
* Fix bug which caused dnsmasq to lose track of processes forked.
* Major rewrite of the DNS server and domain handling code.
* Revise resource handling for number of concurrent DNS queries.
* Improve efficiency of DNSSEC.
* Connection track mark based DNS query filtering.
* Allow smaller than 64 prefix lengths in synth-domain.
* Make domains generated by --synth-domain appear in replies
  when in authoritative mode.
* Ensure CAP_NET_ADMIN capability is available when
  conntrack is configured.
* When --dhcp-hostsfile --dhcp-optsfile and --addn-hosts are
  given a directory as argument, define the order in which
  files within that directory are read.
* Support some wildcard matching of input tags to --tag-if.

Signed-off-by: Etan Kissling <etan.kissling@gmail.com>
3 years agofirmware-utils: tplink-safeloader: set EAP235-Wall v1 soft-version
Sander Vanheule [Fri, 10 Sep 2021 08:57:19 +0000 (10:57 +0200)]
firmware-utils: tplink-safeloader: set EAP235-Wall v1 soft-version

Starting with v3 of the vendor firmware for the TP-Link EAP235-Wall v1,
downgrades to firmware versions below v3 as not allowed.  Since OpenWrt
uses version 0.0.0 as a default, this causes the factory install to fail
on devices with a recent firmware. This failure is associated by the
following message on the device's serial console:

    EAP235/230-Wall forbid fw reverted from 3.x.x to lower version!

Vendor firmware (v3) also uses build and release numbers to compare
images, so identical version numbers are very unlikely to cause issues.
Bump the firmware version to 3.0.0 to ensure users can install OpenWrt
on their devices.

Reported-by: Colton Conor <colton.conor@gmail.com>
Tested-by: Colton Conor <colton.conor@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agofirmware-utils: tplink-safeloader: improve soft-version customisation
Sander Vanheule [Fri, 10 Sep 2021 08:57:18 +0000 (10:57 +0200)]
firmware-utils: tplink-safeloader: improve soft-version customisation

Some devices using the safeloader firmware format require a minimum or
specific version to be set in the soft-version metadata partition.
Currently only custom text values can be provided, but not all device
firmware support this format.

Modify the device info struct to allow for more well-defined types of
soft-version overwrites, and provide a few macros for easy value
initialisation. Requires all existing values to be updated to match the
new structure.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
[Adapt TL-WA1201-V2 entry too]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agowolfssl: update to 4.8.1-stable
Ivan Pavlov [Sun, 5 Sep 2021 20:08:35 +0000 (23:08 +0300)]
wolfssl: update to 4.8.1-stable

Changes from 4.7.0:
  Fix one high (OCSP verification issue) and two low vulnerabilities
  Improve compatibility layer
  Other improvements and fixes

For detailed changes refer to https://github.com/wolfSSL/wolfssl/releases

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
3 years agoocteontx: add linux 5.10 testing kernel support
Daniel Danzberger [Mon, 13 Sep 2021 04:23:29 +0000 (06:23 +0200)]
octeontx: add linux 5.10 testing kernel support

Changes from 5.4 to 5.10:
-------------------------
 - patches from 5.4 are all upstream for 5.10 execpt for
   0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch

 - disable block device data integrity (DIF/DIX/T10) in default config
   (CONFIG_BLK_DEV_INTEGRITY)
   This feature is only supported by:
     - Enterprise SAS/SCSI HBAs and Disks
     - Software raid
     - NVMEs with metadata capabilities (most don't have this)
   None of which are part of any octeontx boards.

 - arm64 TEXT_OFFSET (0x80000) has been removed after 5.4
   This will break Uimages with kernel load addresses that aren't 2MiB
   aligned any longer. Resulting in the kernel silently fail to boot.
   For Gatworks newport boards for example, the uimage kernel load
   and execute address is 0x20080000. These need to be changed to
   0x20000000 when running kernels beyond 5.4.

Tested-on: Gateworks Newport GW64xx

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
3 years agokirkwood: increase kernel size of Linksyses
Pawel Dembicki [Wed, 29 Apr 2020 16:12:51 +0000 (18:12 +0200)]
kirkwood: increase kernel size of Linksyses

Linksyses Audi EA3500 and Viper E4200/E4500 have too small kernel
partition size when kernel 5.10 is used. This patch change kernel
partition to maximum size allowed by u-boot.

Kernel size is overlapping rootfs now, like mvebu Linksyses and stock
partition table. It fix  back to stock via sysupgrade, which was broken
since 18.06.

Fixes: 9808b9ae02 ("kirkwood: switch to kernel 4.9")
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
3 years agorealtek: add ZyXEL GS1900-24HPv2 support
Soma Zambelly [Tue, 24 Aug 2021 21:46:08 +0000 (23:46 +0200)]
realtek: add ZyXEL GS1900-24HPv2 support

The ZyXEL GS1900-24HPv2 is a 24 port PoE switch with two SFP ports, similar to the other GS1900 switches.

Specifications
--------------
* Device:    ZyXEL GS1900-24HPv2
* SoC:       Realtek RTL8382M 500 MHz MIPS 4KEc
* Flash:     16 MiB
* RAM:       W631GG8MB-12 128 MiB DDR3 SDRAM
             (stock firmware is configured to use only 64 MiB)
* Ethernet:  24x 10/100/1000 Mbps, 2x SFP 100/1000 Mbps
* LEDs:      1 PWR LED (green, not configurable)
             1 SYS LED (green, configurable)
             24 ethernet port link/activity LEDs (green, SoC controlled)
             24 ethernet port PoE status LEDs
             2 SFP status/activity LEDs (green, SoC controlled)
* Buttons:   1 "RESTORE" button on front panel
             1 "RESET" button on front panel
* Power      120-240V AC C13
* UART:      1 serial header (J41) with populated standard pin connector on
             the left edge of the PCB, angled towards the side.
             The casing has a rectangular cutout on the side that provides
             external access to these pins.
             Pinout (front to back):
             + GND
             + TX
             + RX
             + VCC

Serial connection parameters for both devices: 115200 8N1.

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

OEM upgrade method:

(Possible on master once https://patchwork.ozlabs.org/project/openwrt/patch/20210624210408.19248-1-bjorn@mork.no/ is merged)

* Log in to OEM management web interface
* Navigate to Maintenance > Firmware > Management
* If "Active Image" has the first option selected, OpenWrt will need to be
  flashed to the "Active" partition. If the second option is selected,
  OpenWrt will need to be flashed to the "Backup" partition.
* Navigate to Maintenance > Firmware > Upload
* Upload the openwrt-realtek-generic-zyxel_gs1900-24hp-v2-initramfs-kernel.bin
  file by your preferred method to the previously determined partition.
  When prompted, select to boot from the newly flashed image, and reboot the switch.
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/openwrt-realtek-generic-zyxel_gs1900-24hp-v2-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

U-Boot TFTP method:

* 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-24HPv2 is a dual-partition device, you want to keep the OEM
  firmware on the backup partition for the time being. OpenWrt can only boot
  from 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-24hp-v2-initramfs-kernel.bin
   > bootm
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/openwrt-realtek-generic-zyxel_gs1900-24hp-v2-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

Signed-off-by: Soma Zambelly <zambelly.soma@gmail.com>
3 years agosunxi: enable MUSB in A7 subtarget
Zhao Yu [Sat, 28 Aug 2021 02:26:11 +0000 (10:26 +0800)]
sunxi: enable MUSB in A7 subtarget

like commit 78c1ed6. Without this,Some USB port on H3 baseboard
can' work. So, need enable MUSB support on this target.

Signed-off-by: Zhao Yu <574249312@qq.com>
3 years agokernel: add package kmod-iio-ads1015 and remove kmod-hwmon-ads1015
Christian Pointner [Sun, 5 Sep 2021 02:37:14 +0000 (04:37 +0200)]
kernel: add package kmod-iio-ads1015 and remove kmod-hwmon-ads1015

The hwmon driver for the ADC ADS1015 has been removed in Linux 5.4 in
favor of a driver in the iio system. For details see:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2c9d5b5e

This fixes: https://bugs.openwrt.org/index.php?do=details&task_id=4005

Run-tested: ramips/mt76x8 (Onion Omega 2+)

Signed-off-by: Christian Pointner <equinox@spreadspace.org>
3 years agokernel: backport switchdev fix for bridge in bridge configurations
Fabian Bläse [Sun, 29 Aug 2021 19:21:35 +0000 (21:21 +0200)]
kernel: backport switchdev fix for bridge in bridge configurations

This patch fixes the forwarding behavior of bridge in bridge
configurations with DSA.

Without it, the configuration of the upper bridge might overwrite
settings of the lower bridge. For example, a vlan-aware bridge
with DSA interfaces in it might be offloaded to the DSA hardware. If the
bridge interface itself gets slave of a different bridge without vlan
filtering, the vlan filtering setting of the lower bridge is overwritten
by the upper bridge, which results in an incorrect hardware
configuration.

This was backported from kernel 5.7.

Ref: https://lore.kernel.org/netdev/20191222192235.GK25745@shell.armlinux.org.uk/
Fixes: FS#3996
Signed-off-by: Fabian Bläse <fabian@blaese.de>
3 years agokernel: bump 5.4 to 5.4.145
John Audia [Mon, 13 Sep 2021 12:26:19 +0000 (08:26 -0400)]
kernel: bump 5.4 to 5.4.145

Removed upstreamed:
  generic-backport/040-ARM-8918-2-only-build-return_address-if-needed.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <graysky@archlinux.us>
3 years agokernel: bump 5.4 to 5.4.144
John Audia [Sat, 4 Sep 2021 23:54:35 +0000 (19:54 -0400)]
kernel: bump 5.4 to 5.4.144

Manually rebased:
  backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

Signed-off-by: John Audia <graysky@archlinux.us>
3 years agokernel: bump 5.10 to 5.10.64
John Audia [Sun, 12 Sep 2021 08:54:32 +0000 (04:54 -0400)]
kernel: bump 5.10 to 5.10.64

All patches automatically rebased.

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

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
3 years agokernel: fix jffs2 compilation with GCC_PLUGIN_RANDSTRUCT enabled
Matt Merhar [Mon, 6 Sep 2021 23:32:48 +0000 (19:32 -0400)]
kernel: fix jffs2 compilation with GCC_PLUGIN_RANDSTRUCT enabled

Designated initializers are required when using the randstruct GCC
plugin, otherwise an error like the following is seen:

./include/linux/lzma.h:60:31: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]

Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
3 years agokernel: Add missing kernel config options
Hauke Mehrtens [Sun, 12 Sep 2021 11:05:30 +0000 (13:05 +0200)]
kernel: Add missing kernel config options

These options are selectable when some of the kernel debug options like
KERNEL_SOFTLOCKUP_DETECTOR are selected.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agobuild: Replace KERNEL_LOCKUP_DETECTOR with KERNEL_SOFTLOCKUP_DETECTOR
Hauke Mehrtens [Sun, 12 Sep 2021 10:56:48 +0000 (12:56 +0200)]
build: Replace KERNEL_LOCKUP_DETECTOR with KERNEL_SOFTLOCKUP_DETECTOR

The LOCKUP_DETECTOR configuration option split into the
SOFTLOCKUP_DETECTOR and HARDLOCKUP_DETECTOR configuration option some
time ago. The HARDLOCKUP_DETECTOR option is only working on some
architectures, but SOFTLOCKUP_DETECTOR should work everywhere. Replace
KERNEL_LOCKUP_DETECTOR with KERNEL_SOFTLOCKUP_DETECTOR.

LOCKUP_DETECTOR will be selected by SOFTLOCKUP_DETECTOR automatically.

Fixes: b951f53fbae3 ("build: Add additional kernel debug options")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agoipq806x: switch to kernel 5.10
Ansuel Smith [Tue, 7 Sep 2021 19:47:14 +0000 (21:47 +0200)]
ipq806x: switch to kernel 5.10

Move kernel version to 5.10 as has been tested by many users
with positive feedback.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[Tested on: ipq8064/g10; ipq8065/nbg6817]
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
3 years agoipq-wifi: Drop empty wifi package for Netgear WAC510
Sven Eckelmann [Sat, 11 Sep 2021 07:16:11 +0000 (09:16 +0200)]
ipq-wifi: Drop empty wifi package for Netgear WAC510

The ipq-wifi-netgear_wac510 package is not selected by any device and would
be empty anyway. The default board-2.bin from ath10k-board-qca4019 is
therefore used for this device and the package doesn't provide any visible
features.

Fixes: b126d9c3a3d3 ("ipq40xx: add netgear wac510 support")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
3 years agoipq40xx: Fix board-2.bin package name for Plasma Cloud PA2200
Sven Eckelmann [Sat, 11 Sep 2021 06:33:30 +0000 (08:33 +0200)]
ipq40xx: Fix board-2.bin package name for Plasma Cloud PA2200

The board data file for the Plasma Cloud PA2200 is not part of the default
board-2.bin which is shipped by ath10k-board-qca4019. A typo in the device
package name resulted in a not correctly selected package for the device
specific board-2.bin. The wifi driver has therefore loaded the wrong
calibration information into the wifi chip.

Fixes: 4871fd2616ac ("ipq40xx: add support for Plasma Cloud PA2200")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
3 years agoipq40xx: Fix board-2.bin package name for Plasma Cloud PA1200
Sven Eckelmann [Sat, 11 Sep 2021 06:33:30 +0000 (08:33 +0200)]
ipq40xx: Fix board-2.bin package name for Plasma Cloud PA1200

The board data file for the Plasma Cloud PA1200 is not part of the default
board-2.bin which is shipped by ath10k-board-qca4019. A typo in the device
package name resulted in a not correctly selected package for the device
specific board-2.bin. The wifi driver has therefore loaded the wrong
calibration information into the wifi chip.

Fixes: ea5bb6bbfee0 ("ipq40xx: add support for Plasma Cloud PA1200")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
3 years agoipq40xx: Select correct board-2.bin for EnGenius EMR3500
Sven Eckelmann [Sat, 11 Sep 2021 06:33:30 +0000 (08:33 +0200)]
ipq40xx: Select correct board-2.bin for EnGenius EMR3500

The board data file for the EnGenius EMR3500 is not part of the default
board-2.bin which is shipped by ath10k-board-qca4019. As result, the wrong
calibration information will be loaded into the wifi chip.

Fixes: 3f61e5e1b97e ("ipq40xx: add support for EnGenius EMR3500")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
3 years agoipq40xx: Select correct board-2.bin for EnGenius EMD1
Sven Eckelmann [Sat, 11 Sep 2021 06:33:30 +0000 (08:33 +0200)]
ipq40xx: Select correct board-2.bin for EnGenius EMD1

The board data file for the EnGenius EMD1 is not part of the default
board-2.bin which is shipped by ath10k-board-qca4019. As result, the wrong
calibration information will be loaded into the wifi chip.

Fixes: 51f303597839 ("ipq40xx: add support for EnGenius EMD1")
Signed-off-by: Sven Eckelmann <sven@narfation.org>