openwrt/staging/hauke.git
23 months agoCI: Add workaround for github uppercase usernames
Edward Chow [Mon, 3 Oct 2022 11:39:58 +0000 (19:39 +0800)]
CI: Add workaround for github uppercase usernames

The workflow defined in tools.yml and kernel.yml used to fail on
forked repositories of contributers whose github username contains
uppercase letters.

A workaround mentioned in
https://github.com/orgs/community/discussions/27086 and
https://stackoverflow.com/questions/70326569/ is applied.

Signed-off-by: Edward Chow <equu@openmail.cc>
(cherry picked from commit c27b43956407f3adc3cc2693792acd6b40a01877)

23 months agoCI: use tools:latest container to speedup kernel workflow
Christian Marangi [Mon, 5 Sep 2022 21:18:00 +0000 (23:18 +0200)]
CI: use tools:latest container to speedup kernel workflow

Use tools:latest container with prebuilt host tools to speedup kernel
compilation in kernel workflow.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 5d09118f8e60fa151e03916f255f5511e197af68)

23 months agoCI: create Docker container containing compiled tools
Paul Spooren [Mon, 8 Aug 2022 21:37:54 +0000 (23:37 +0200)]
CI: create Docker container containing compiled tools

Currently each Kernel compilation takes about 30 minutes of which 20
minutes are used to compile our tools. While the toolchain is downloaded
and instantly ready the tools are missing.

This commit starts uploading a Docker container including compiled tools
which are ready to use. It is automatically updated whenever any tools
are changed.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Co-Developed-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 25b65f548dfd93cae87781276bfff9a27cd3ebd4)

23 months agoCI: use buildbot container for building
Paul Spooren [Sun, 20 Mar 2022 20:02:08 +0000 (20:02 +0000)]
CI: use buildbot container for building

Instead of using a fresh Linux installation which is setup every time
use the Buildbot container which is used for our own Buildbot
infrastructure, too.
While at it also tidy up the workflow to make it more consistent with
other workflow.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Co-Developed-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 3b23227d43ec720f810e6e261945530f7bc549f0)

23 months agoci: show build failures directly in job log output
Petr Štetiar [Mon, 22 Aug 2022 13:05:01 +0000 (15:05 +0200)]
ci: show build failures directly in job log output

Instead of waiting for complete workflow finish, then downloading the
artifacts, unpacking them and inspecting them, lets try to make the
build failure immediately visible in the log output:

  ====== Make errors from logs/target/linux/compile.txt ======
  * Legacy (non-UHI/non-FIT) Boards
  *
  Support MIPS SEAD-3 boards (LEGACY_BOARD_SEAD3) [N/y/?] (NEW)
  Error in reading or end of file.

  make[6]: *** [scripts/kconfig/Makefile:77: syncconfig] Error 1
  make[5]: *** [Makefile:616: syncconfig] Error 2
  make[4]: *** [Makefile:736: include/config/auto.conf.cmd] Error 2
  make[3]: *** [Makefile:24: build_dir/target-mipsel-openwrt-linux-musl_musl/linux-ramips_mt7620/linux-5.15.62/.modules] Error 2
  make[2]: *** [Makefile:11: compile] Error 2
  time: target/linux/compile#30.09#11.30#37.92

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit f4ca4187cde01a3e412f10657bec0790d3a4cd94)

23 months agoci: move scripts into separate directory
Petr Štetiar [Mon, 5 Sep 2022 07:04:27 +0000 (09:04 +0200)]
ci: move scripts into separate directory

So it's clean and tidy.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 63ed733d30153667d7d645ab0ee3f5614089c759)

23 months agobuild: harden GitHub workflow permissions
Alex Low [Mon, 19 Sep 2022 10:20:37 +0000 (12:20 +0200)]
build: harden GitHub workflow permissions

Grant pull-requests write permission to the labeler workflow and
read-only to everything else.

Signed-off-by: Alex Low <aleksandrosansan@gmail.com>
[ wrap to 80 columns and fix wrong author as requested by author itself ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 715259940776843d8799bc39de8eb50eb764189b)

23 months agoCI: include automatic Pull Request Labeler
Piotr Dymacz [Mon, 20 Jun 2022 11:13:30 +0000 (13:13 +0200)]
CI: include automatic Pull Request Labeler

This adds GitHub CI action which makes use of 'Labeler', allowing
automatic labeling of new PRs, based on the modified files paths.

Below labels are supported and more can be added later:
- 'target/*'
- 'target/imagebuilder'
- 'kernel'
- 'core packages'
- 'build/scripts/tools'
- 'toolchain'
- 'GitHub/CI'

For more information:
https://github.com/marketplace/actions/labeler

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
(cherry picked from commit 4f42566d47999c392c8ea41dc27215b43ed9ee40)

23 months agoCI: package kmods in kernel workflow
Christian Marangi [Sat, 10 Sep 2022 19:18:10 +0000 (21:18 +0200)]
CI: package kmods in kernel workflow

Actually package kmods in kernel workflow to catch dependency error and
other problem that may arise from kmods packaging.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 0c45db5560df47a0344a21c2443a4f2889c42ac8)

23 months agoCI: kernel: Cache external toolchain
Christian Marangi [Fri, 9 Sep 2022 19:09:30 +0000 (21:09 +0200)]
CI: kernel: Cache external toolchain

Cache external toolchain for each target to remove load from openwrt cdn
server and make the external toolchain setup quicker.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit f522c27385d6f94e5dbcc3e84968f0e38609ff1c)

23 months agoCI: kernel: Build all kernel modules
Hauke Mehrtens [Mon, 8 Aug 2022 20:57:59 +0000 (22:57 +0200)]
CI: kernel: Build all kernel modules

Activate building all kernel modules.

This builds all kernel modules from the core packages and the feeds.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit fed325f4633cb302a5f43c42285e8ab0fd144262)

23 months agoCI: kernel: Checkout feeds from github
Hauke Mehrtens [Mon, 8 Aug 2022 18:26:18 +0000 (20:26 +0200)]
CI: kernel: Checkout feeds from github

Instead of cloning the feeds from the default location at
git.openwrt.org use the github action to clone them directly from
github. We saw some error messages when cloning from git.openwrt.org,
probably related to some rate limiting applied. Cloning from github
within a github action should work more stable.

The "./scripts/feeds update -a" script will use the already checked out
feed repositories and not clone them again from git.openwrt.org, but it
will also not change the branch name.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit b120e78917099d46a25cc521998b917fdf08e388)

23 months agoCI: kernel: Show used OpenWrt configuration
Hauke Mehrtens [Sun, 7 Aug 2022 16:22:52 +0000 (18:22 +0200)]
CI: kernel: Show used OpenWrt configuration

Show the configuration used to build OpenWrt before starting the build.
This should make it easier for people to reproduce problems when it
fails.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 43afaf6149129a72a8f3e5d3d0d545e54ac81b3a)

23 months agoCI: kernel: Use downloads.cdn.openwrt.org
Hauke Mehrtens [Sun, 7 Aug 2022 16:21:44 +0000 (18:21 +0200)]
CI: kernel: Use downloads.cdn.openwrt.org

Use downloads.cdn.openwrt.org to download the toolchain. This should
reduce the load on the servers.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 7b4daf00766620faac8212b46259064ca6e2c716)

23 months agoCI: kernel: Trigger workflow for more directories
Hauke Mehrtens [Sun, 7 Aug 2022 16:18:40 +0000 (18:18 +0200)]
CI: kernel: Trigger workflow for more directories

Trigger the kernel build workflow also for more directories.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 546822775cd988360964687c0cb430d67bd5c617)

23 months agoCI: run inside the buildbot docker container
Paul Spooren [Sun, 20 Mar 2022 15:31:24 +0000 (15:31 +0000)]
CI: run inside the buildbot docker container

Run github actions insider buildbot docker container.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[ run container under buildbot user ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 8a77adb0485aeb40f6550eb7fcdb461b3eaffe58)

23 months agoCI: add Kernel compile tests
Paul Spooren [Wed, 9 Mar 2022 17:22:22 +0000 (18:22 +0100)]
CI: add Kernel compile tests

Add Github Actions yaml script to build test kernel PR changes for
each target.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[ add commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit c17c931a90e5cb9613875a42ef8eace46be539f3)

23 months agoCI: usability improvements for tools
Paul Spooren [Wed, 30 Mar 2022 00:43:17 +0000 (01:43 +0100)]
CI: usability improvements for tools

* Always store build logs
* Store .config as an artifact
* Rename job to `tools-{ os }` for log archive without spaces
* Run CI job on changes to the CI file itself

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 80f79beb952dcb87d967a130d326cb1dd5a077ed)

23 months agoCI: move logs/ to GITHUB_WORKSPACE
Paul Spooren [Wed, 9 Mar 2022 12:30:21 +0000 (13:30 +0100)]
CI: move logs/ to GITHUB_WORKSPACE

Artifacts can only be uploaded from inside the GITHUB_WORKSPACE. While
the Linux CI jobs run inside that per default, a special case-sensitive
mount outside the GITHUB_WORKSPACE is used for macOS builds.

To make log artifacts work for both macOS and Linux, move logs/ folder
to GITHUB_WORKSPACE on failures.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit a5eeac8033786a7a04b7569175e41e415b6579c0)

23 months agoCI: build changes in tools/ on ubuntu/macos
Paul Spooren [Fri, 25 Feb 2022 11:28:46 +0000 (12:28 +0100)]
CI: build changes in tools/ on ubuntu/macos

This commits adds GitHub CI to check that all tools compile on both
Ubuntu and macOS. Since running in parrallel this should also detect
badly set depdendencies within tools/Makefile.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit fb830fd894f7ae5ad23f712ebf50808f8be2a1f7)

23 months agoCI: allow dots in commit subject area
Paul Spooren [Wed, 23 Feb 2022 18:51:43 +0000 (19:51 +0100)]
CI: allow dots in commit subject area

Due to a limited grep pattern, subjects containing dots like `image.mk`
were falsely reported as problematic. Extend pattern to allow dots.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit fb5d0dc362e5206dbedb694dbe27953582eb887b)

23 months agoCI: add formal checks
Paul Spooren [Thu, 27 Jan 2022 09:25:19 +0000 (10:25 +0100)]
CI: add formal checks

The formal checks verify the following things:
- Commits does not contain any merge commits
- Signed by a real name
- Commit titles starts with an `<area>:`
- Author name matches signed of name
- Commit message is not empty

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 3dc38823a2994639500ca201ac16928b7bf0bd8a)

23 months agoscripts: ext-toolchain: add support for musl
Christian Marangi [Sun, 17 Jul 2022 15:56:59 +0000 (17:56 +0200)]
scripts: ext-toolchain: add support for musl

Openwrt now supports only glibc and musl. Add support for musl and
rework the libc check to handle the new config flags and correctly
compile package basend on that.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 7be01fe13b4517e5edb8a4818f437d60144cdcb4)

23 months agoscripts: ext-toolchain: add support for info.mk in probe_cc
Christian Marangi [Sun, 17 Jul 2022 15:56:36 +0000 (17:56 +0200)]
scripts: ext-toolchain: add support for info.mk in probe_cc

Openwrt generate info.mk that contains the libc type. For probe_cc check
if the file exist and parse directly it for LIBC type.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 75311977f5ff64b491cb57ac713d75e0e410d786)

23 months agoscripts: ext-toolchain: actually probe libc type on config generation
Christian Marangi [Sun, 17 Jul 2022 15:53:58 +0000 (17:53 +0200)]
scripts: ext-toolchain: actually probe libc type on config generation

Currently we never call probe_cc before config generation, this cause
the script to never actually detect the correct libc type.
Call probe_cc before config generation to correctl set the .config file.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit ddeabc75ebe3151ff7da302cb1aae702b3ad7eba)

23 months agoscripts: ext-toolchain: add option to overwrite config
Christian Marangi [Mon, 4 Jul 2022 16:22:18 +0000 (18:22 +0200)]
scripts: ext-toolchain: add option to overwrite config

It can be useful to overwrite an already generated config.
Option are simply added at the end of the config and make defconfig
will overwrite the relevant option with the new one.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit f4dd18ca39c42a324e34633c8ee553717531bc3b)

23 months agoscripts: ext-toolchain: fix wrong prefix in print_config generation
Christian Marangi [Sun, 3 Jul 2022 00:20:11 +0000 (02:20 +0200)]
scripts: ext-toolchain: fix wrong prefix in print_config generation

The parsed prefix in print_config is wrong and this produce broken
generated .config that won't work with any external toolchain.

Currently the prefix from a CC of

'arm-openwrt-linux-muslgnueabi-gcc-12.1.0'

produce a prefix

'arm-openwrt-linux-muslgnueabi-gcc-'

This is wrong as the real prefix should be

'arm-openwrt-linux-muslgnueabi-'

This is probably caused by a change in how the toolchain is now handled
that now append also the gcc version. Probably in ancient days the
version wasn't part of the name and the prefix generation stripped the
'-gcc' instead of the gcc version.

Fix this and correctly strip the gcc version and the gcc suffix to
correctly call toolchain bins.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 53c293262fce844c8291ab82e6726a8489d3c57b)

23 months agoscripts: fix various typos
Josh Soref [Sun, 26 Sep 2021 21:58:59 +0000 (17:58 -0400)]
scripts: fix various typos

This only affects typos in comments or user-facing output.

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
[only picks changes to scripts, drop "commandline" replacement,
 fix case for "arbitrary", improve commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit 08622de7d66eb90038de54f34ab2fe2308424fd0)
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoscripts/ext-tools: introduce new script to install prebuilt tools
Christian Marangi [Fri, 30 Sep 2022 17:36:06 +0000 (19:36 +0200)]
scripts/ext-tools: introduce new script to install prebuilt tools

Add a simple script to make it easier to install a prebuilt tools tar.
Currently it will be used by our tools container and kernel workflow on
github.

Simple script that take a tar that contains prebuilt host tools, extract
them and refresh the timestamps to skip recompilation of such host
tools.

By default it refresh timestamps of build_dir/host and
staging_dir/host/stamp.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 5428bdc2dfaa45bc7adc89c3b9224da7d21961d0)

23 months agotoolchain: Include ./include/fortify for external musl toolchain
Hauke Mehrtens [Sun, 11 Sep 2022 22:31:43 +0000 (00:31 +0200)]
toolchain: Include ./include/fortify for external musl toolchain

When building with an external toolcahin with musl also include
./include/fortify by default. This is also done when we build with the
internal toolchain using musl libc.

Without this extra include the fortify source feature is not working
when using an external musl toolchain. All binaries were compiled
without fortify source when an external musl toolchain was used. All
binaries release done by the OpenWrt project use the internal toolcahin
where fortify source is working.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 3053045093a5c89dad970b7db3ed9f2a5be993f6)
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agorules_mk: use gcc versions for external toolchain
Vincent Wiemann [Mon, 28 Dec 2020 15:00:13 +0000 (16:00 +0100)]
rules_mk: use gcc versions for external toolchain

When using the OpenWrt toolchain as an external toolchain the build
failed due to missing LTO support. By choosing the GCC wrappers of
the tools this commit makes sure that the LTO-enabled executables
are being used.

Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com>
[ wrap the commit description to 72 char ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 2555ffb4536e2727465e9a0d426ad3c4f1ef003a)

23 months agorules_mk: don't include wrapped bin with external toolchains
Christian Marangi [Sun, 3 Jul 2022 00:06:21 +0000 (02:06 +0200)]
rules_mk: don't include wrapped bin with external toolchains

Don't add wrapped bin to the TARGET_PATH as it does cause compilation
error.

cmake.mk will use the "command -v" and will use the wrapped bin instead
of the external toolchain bin as they have the same name and command
will select the first result.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit a90eabf60255773231ed0259e5da5eb6a36fe9ce)

23 months agobuild: make find_md5 reproducible with AUTOREMOVE
Christian Marangi [Tue, 6 Sep 2022 14:48:37 +0000 (16:48 +0200)]
build: make find_md5 reproducible with AUTOREMOVE

While experimenting with the AUTOREMOVE option in search of a way to use
prebuilt host tools in different buildroot, it was discovered that the
md5 generated by find_md5 in depends.mk is not reproducible.

Currently the hash is generated by the path of the file in addition to
the file mod time. Out of confusion, probably, there was an idea that
such command was used on the package build_dir. Reality is that this
command is run on the package files. (Makefile, patches, src)

This is problematic because the package Makefile (for example) change at
each git clone and base the hash on the Makefile mtime doesn't really
reflect if the Makefile actually changes across a buildroot or not.

A better approach is to generate an hash of each file and then generate
an hash on the sort hash list. This way we remove the problem of git
clone setting a wrong mtime while keeping the integrity of checking if a
file changed for the package as any change will result in a different
hash.

Introduce a new kind of find_md5 function, find_md5_reproducible that
apply this new logic and limit it only with AUTOREMOVE option set to
prevent any kind of slowdown due to additional hash generation.

(cherry picked from commit 53a08e37437972ba0a8fbf953a93a70a6b784ef4)
[ reworked mkhash to old implementation ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoprocd: add patch to fix compilation error
Christian Marangi [Tue, 29 Nov 2022 15:35:48 +0000 (16:35 +0100)]
procd: add patch to fix compilation error

procd complain for an unused verbose variable causing compilation error.
Fix this by setting the variable static following upstream procd
changes.

This is a variant of 0ee73b2c86a853ae3274c7080e2dcd36b81aa1fa that
introduced major change and fixed the verbose variable to static.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agolayerscape: fix compilation error for missing define of dwc quirk
Christian Marangi [Mon, 28 Nov 2022 20:05:54 +0000 (21:05 +0100)]
layerscape: fix compilation error for missing define of dwc quirk

Add missing define for dwc quirk patch required to fix compilation error
for layerscape target. This was wrongly dropped in a kernel bump.

Fixes: 8e5de897691a ("kernel: bump 5.4 to 5.4.213")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agobcm53xx: update DTS files with the latest changes
Rafał Miłecki [Thu, 10 Nov 2022 08:28:23 +0000 (09:28 +0100)]
bcm53xx: update DTS files with the latest changes

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 8cdafa149eda4e343905ccf00cad34ff2b52c85b)

23 months agobcm53xx: backport DT changes from 5.17 & 5.18
Rafał Miłecki [Wed, 30 Mar 2022 14:05:55 +0000 (16:05 +0200)]
bcm53xx: backport DT changes from 5.17 & 5.18

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit a721fb9f839b3ca71da275a1c99620ef9342fb28)

23 months agobcm53xx: use new USB 2.0 PHY binding
Rafał Miłecki [Tue, 23 Nov 2021 09:14:22 +0000 (10:14 +0100)]
bcm53xx: use new USB 2.0 PHY binding

This fixes:
[   10.440495] bcm_ns_usb2 1800c000.usb2-phy: can't request region for resource [mem 0x1800c000-0x1800cfff]
[   10.450039] bcm_ns_usb2 1800c000.usb2-phy: Failed to map DMU regs
[   10.456183] bcm_ns_usb2: probe of 1800c000.usb2-phy failed with error -16
caused by conflict in allocating resources.

Fixes: 44ce70f0e209c ("bcm53xx: drop downstream patch that now breaks pinctrl driver")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 1d7c1a41987ae463700224c08a3629e4086a8f39)

23 months agobcm53xx: use more upsteam DT patches from 5.16 / 5.17
Rafał Miłecki [Thu, 18 Nov 2021 15:34:55 +0000 (16:34 +0100)]
bcm53xx: use more upsteam DT patches from 5.16 / 5.17

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 5901917b936d93c8facda6dfec4c5d77f666cbac)

23 months agobcm53xx: add first 5.17 DTS changes
Rafał Miłecki [Thu, 4 Nov 2021 06:00:21 +0000 (07:00 +0100)]
bcm53xx: add first 5.17 DTS changes

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 1ee6d3d24e328e29fcf068e90953c760305462d4)

23 months 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>
(cherry picked from commit 366be2183e90b6ea8110d7236f8a93c8028573f8)

23 months agobcm53xx: specify switch ports for more devices
Rafał Miłecki [Tue, 7 Sep 2021 11:22:41 +0000 (13:22 +0200)]
bcm53xx: specify switch ports for more devices

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit ae33ce2af2b273332017d0b49e37c4224e40a62a)

23 months agobcm53xx: backport missed DT patch cleaning up CRU block
Rafał Miłecki [Mon, 30 Aug 2021 06:54:29 +0000 (08:54 +0200)]
bcm53xx: backport missed DT patch cleaning up CRU block

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 8a4d4d4243357b28722e3327e2c7c7b4ceb288ec)

23 months agobcm53xx: backport the latest upstream DT changes
Rafał Miłecki [Sun, 29 Aug 2021 20:53:55 +0000 (22:53 +0200)]
bcm53xx: backport the latest upstream DT changes

This includes:
1. BCM5301X changes from 5.14 and queued 5.15 stuff
2. NSP changes from 5.11 - 5.15 for kernel 5.10

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit bce00f47e5d67e5a33e9d7fa137cbe0a5d3d334b)

23 months agomac80211: Update to version 5.10.157
Hauke Mehrtens [Sat, 3 Dec 2022 20:34:02 +0000 (21:34 +0100)]
mac80211: Update to version 5.10.157

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agobcm4908: update DTS files with the latest changes
Rafał Miłecki [Fri, 11 Nov 2022 13:54:46 +0000 (14:54 +0100)]
bcm4908: update DTS files with the latest changes

The most affecting change is move of files from bcm4908/ to the bcmbca/.
That required updating few paths.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 45ac906c6415cebd12281088da6b06668c057f0a)

23 months agokernel: improve description of NTFS kernel packages
Rafał Miłecki [Wed, 2 Nov 2022 19:26:33 +0000 (20:26 +0100)]
kernel: improve description of NTFS kernel packages

This helps choosing the right NTFS driver from two available options.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit b066ad7d9aa5221bfd334a3017abe9bcd171b33f)

23 months agobase-files: support "metric" in board.json
Rafał Miłecki [Sat, 3 Sep 2022 12:31:29 +0000 (14:31 +0200)]
base-files: support "metric" in board.json

It allows prepopulating /etc/config/network interface-s with predefined
metric. It may be useful for devices with multiple WAN ports.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 7f443d2d9aa1170d6b68f0dc6d5b5552882ee327)

23 months agokernel: update U-Boot nvmem driver to v6.2 release version
Rafał Miłecki [Sat, 12 Nov 2022 09:42:51 +0000 (10:42 +0100)]
kernel: update U-Boot nvmem driver to v6.2 release version

Backport queued patches that
1. Fix CRC32 calculation for redundant images
2. Fix CRC32 on big-endian
3. Fix parting images with Broadcom header

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 797177ad85cbf92b5c1e270751eaca9eb4f34f30)

23 months agobcm4908: fix Asus GT-AX6000 image
Rafał Miłecki [Sat, 3 Sep 2022 18:41:00 +0000 (20:41 +0200)]
bcm4908: fix Asus GT-AX6000 image

1. Include Linux DTB
2. Add 50991 variant (seems to differ by 1 PHY we don't support yet)

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit b8f8c6f2dd8d47216117cb5b78184531ab21dddd)

23 months agobcm4908: use upstream patches for Asus GT-AC5300 LEDs
Rafał Miłecki [Fri, 2 Sep 2022 15:07:40 +0000 (17:07 +0200)]
bcm4908: use upstream patches for Asus GT-AC5300 LEDs

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit d51e990ff81ad0335294749e8d2fc8e69ceb9179)

23 months agowolfssl: update to v5.5.3
Nick Hainke [Wed, 16 Nov 2022 07:48:02 +0000 (08:48 +0100)]
wolfssl: update to v5.5.3

Remove "200-ecc-rng.patch" because it was upstramed by:
https://github.com/wolfSSL/wolfssl/commit/e2566bab2122949a6a0bb2276d0a52598794d7d0
Refreshed "100-disable-hardening-check.patch".

Fixes CVE 2022-42905.

Release Notes:
- https://github.com/wolfSSL/wolfssl/releases/tag/v5.5.2-stable
- https://github.com/wolfSSL/wolfssl/releases/tag/v5.5.3-stable

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 745f1ca9767716c43864a2b7a43ed60b16c25560)

23 months agokernel: bump 5.4 to 5.4.224
Hauke Mehrtens [Sun, 27 Nov 2022 14:34:18 +0000 (15:34 +0100)]
kernel: bump 5.4 to 5.4.224

Compile-tested: x86/64
Run-tested: x86/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoramips: fix GB-PC1 and GB-PC2 LEDs
Arınç ÜNAL [Wed, 14 Sep 2022 18:31:41 +0000 (21:31 +0300)]
ramips: fix GB-PC1 and GB-PC2 LEDs

Add the missing LEDs for GB-PC2. Some of these LEDs don't exist on the
device schematics. Tests on a GB-PC2 by me and Petr proved otherwise.

Remove ethblack-green and ethblue-green LEDs for GB-PC1. They are not wired
to GPIO 3 or 4 and the wiring is currently unknown.

Set ethyellow-orange to display link state and activity of the ethyellow
interface for GB-PC2.

Link: https://github.com/ngiger/GnuBee_Docs/blob/master/GB-PCx/Documents/GB-PC2_V1.1_schematic.pdf
Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
(cherry picked from commit 2a6ef7f53d7b96e4ee0200196c28ed6b0a7c8465)

23 months agoramips: fix GB-PC1 and GB-PC2 device support
Arınç ÜNAL [Wed, 14 Sep 2022 18:31:40 +0000 (21:31 +0300)]
ramips: fix GB-PC1 and GB-PC2 device support

Change switch port labels to ethblack & ethblue.
Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
Add the external phy with ethyellow label on the GB-PC2 devicetree.
Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
Update interface name and change netdev function.
Enable lzma compression to make up for the increased size of the kernel.
Make spi flash bindings on par with mainline Linux to fix read errors.

Tested on GB-PC2 by Petr.

Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
(cherry picked from commit 4807bd6a00bcf44dd821047db76a2a799f403cd4)

23 months agoipq40xx: luma_wrtq-acn329: swap ethernet MAC addresses
Tomasz Maciej Nowak [Mon, 3 Oct 2022 13:20:10 +0000 (15:20 +0200)]
ipq40xx: luma_wrtq-acn329: swap ethernet MAC addresses

Adjust them according to OEM firmware.

Fixes: e24635710c7e (" ipq40xx: add support for Luma Home WRTQ-329ACN")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
23 months agoopenssl: bump to 1.1.1s
John Audia [Thu, 3 Nov 2022 13:27:49 +0000 (09:27 -0400)]
openssl: bump to 1.1.1s

Changes between 1.1.1r and 1.1.1s [1 Nov 2022]

  *) Fixed a regression introduced in 1.1.1r version not refreshing the
     certificate data to be signed before signing the certificate.
     [Gibeom Gwon]

 Changes between 1.1.1q and 1.1.1r [11 Oct 2022]

  *) Fixed the linux-mips64 Configure target which was missing the
     SIXTY_FOUR_BIT bn_ops flag. This was causing heap corruption on that
     platform.
     [Adam Joseph]

  *) Fixed a strict aliasing problem in bn_nist. Clang-14 optimisation was
     causing incorrect results in some cases as a result.
     [Paul Dale]

  *) Fixed SSL_pending() and SSL_has_pending() with DTLS which were failing to
     report correct results in some cases
     [Matt Caswell]

  *) Fixed a regression introduced in 1.1.1o for re-signing certificates with
     different key sizes
     [Todd Short]

  *) Added the loongarch64 target
     [Shi Pujin]

  *) Fixed a DRBG seed propagation thread safety issue
     [Bernd Edlinger]

  *) Fixed a memory leak in tls13_generate_secret
     [Bernd Edlinger]

  *) Fixed reported performance degradation on aarch64. Restored the
     implementation prior to commit 2621751 ("aes/asm/aesv8-armx.pl: avoid
     32-bit lane assignment in CTR mode") for 64bit targets only, since it is
     reportedly 2-17% slower and the silicon errata only affects 32bit targets.
     The new algorithm is still used for 32 bit targets.
     [Bernd Edlinger]

  *) Added a missing header for memcmp that caused compilation failure on some
     platforms
     [Gregor Jasny]

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit a0814f04ed955eb10b25df0ce6666ed91f11ca1b)

23 months agomediatek: add missing config symbols
David Bauer [Thu, 12 Aug 2021 21:40:32 +0000 (23:40 +0200)]
mediatek: add missing config symbols

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 101c0c00a7143a1e50e4c0923f0af88b5176f6ed)

23 months agokernel: Add missing mediatek configuration options
Hauke Mehrtens [Wed, 6 Jul 2022 18:32:11 +0000 (20:32 +0200)]
kernel: Add missing mediatek configuration options

When building the mediatek/mt7629 target in OpenWrt 22.03 the kernel
does not have a configuration option for CONFIG_CRYPTO_DEV_MEDIATEK. Add
this option to the generic kernel configuration and also add two other
configuration options which are removed when we refresh the mt7629
kernel configuration.

Fixes: 2bea35cb55d7 ("mediatek: remove crypto-hw-mtk package")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit dcc0fe24ea216d32300c0f01c8879e586d89cc1e)
(cherry picked from commit bfd070e7fa5ad715fb1a8f8449ab5d7750c59338)

23 months agolantiq: add 6.1 tag to upstream patch
Aleksander Jan Bajkowski [Wed, 5 Oct 2022 21:05:26 +0000 (23:05 +0200)]
lantiq: add 6.1 tag to upstream patch

Add 6.1 tag to upstream patch now that 6.1 got tagged. This permits to
track patch in a better way and directly drop them on kernel bump.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
(cherry picked from commit 802ca492d85e6f6af05676518889d4de50697477)

23 months agolantiq: enable interrupts on second VPEs
Aleksander Jan Bajkowski [Sat, 10 Sep 2022 18:13:58 +0000 (20:13 +0200)]
lantiq: enable interrupts on second VPEs

This patch is needed to handle interrupts by the second VPE on the Lantiq
ARX100, xRX200, xRX300 and xRX330 SoCs. Switching some ICU interrupts to
the second VPE results in a hang. Currently, the vsmp_init_secondary()
function is responsible for enabling these interrupts. It only enables
Malta-specific interrupts (SW0, SW1, HW4 and HW5).

The MIPS core has 8 interrupts defined. On Lantiq SoCs, hardware
interrupts are wired to an ICU instance. Each VPE has an independent
instance of the ICU. The mapping of the ICU interrupts is shown below:
SW0(IP0) - IPI call,
SW1(IP1) - IPI resched,
HW0(IP2) - ICU 0-31,
HW1(IP3) - ICU 32-63,
HW2(IP4) - ICU 64-95,
HW3(IP5) - ICU 96-127,
HW4(IP6) - ICU 128-159,
HW5(IP7) - timer.

This patch enables all interrupt lines on the second VPE.

This problem affects multithreaded SoCs with a custom interrupt controller.
SOCs with 1004Kc core and newer use the MIPS GIC. At this point, I am aware
that the Realtek RTL839x and RTL930x SoCs may need a similar fix. In the
future, this may be replaced with some generic solution.

Tested on Lantiq xRX200.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
(cherry picked from commit fbd33d61648ae8982fbada7ad3b6d8222b367ab5)

23 months agokernel: backport flow_dissect support for tag_brcm
Rafał Miłecki [Thu, 24 Nov 2022 15:39:10 +0000 (16:39 +0100)]
kernel: backport flow_dissect support for tag_brcm

This change helps BCM4908 SoC. It was capable of 940 Mb/s masq NAT while
using iperf but users reported lower & unstable speeds for HTTP based
tests.

For LibreSpeed tests this bumps NAT speed from ~930 Mb/s to ~990 Mb/s
(not that this value seems real but speed bump definitely is).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
23 months agokernel: bump 5.4 to 5.4.224
Hauke Mehrtens [Sat, 12 Nov 2022 23:44:25 +0000 (00:44 +0100)]
kernel: bump 5.4 to 5.4.224

Manually adapted:
 generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
 lantiq/patches-5.4/0028-NET-lantiq-various-etop-fixes.patch

Compile-tested: x86/64
Run-tested: x86/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoiwinfo: update to latest HEAD
Hauke Mehrtens [Sat, 20 Aug 2022 20:51:29 +0000 (22:51 +0200)]
iwinfo: update to latest HEAD

0dad3e6 Add support for CCMP-256 and GCMP-256 ciphers

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit cc6a323e2328176b732b13f1f09745354270cd39)

23 months agoiwinfo: update to latest HEAD
Hauke Mehrtens [Sat, 13 Aug 2022 16:35:46 +0000 (18:35 +0200)]
iwinfo: update to latest HEAD

705d3b5 iwinfo: Add missing auth_suites mappings for WPA3

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit cc2dfc5e4dc2e480203b826749186c73021795df)

23 months agouboot-layerscape: adjust LS1012A-IOT config and env
Pawel Dembicki [Mon, 24 Oct 2022 13:11:07 +0000 (15:11 +0200)]
uboot-layerscape: adjust LS1012A-IOT config and env

In a254279a6c30 LS1012A-IOT kernel image was switched to FIT.

But u-boot config is lack of FIT and ext4 support.

This patch enables it.

It also fix envs, because for some reason this board need to use "loadaddr"
variable in brackets.

Fixes: #9894
Fixes: a254279a6c30 ("layerscape: Change to combined rootfs on sd images")
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
(cherry picked from commit d75ed3726d994fd050730e9ab5923d6232913054)

2 years agobcm4908: backport upstream BQL support for bcm4908_enet
Rafał Miłecki [Thu, 27 Oct 2022 20:33:14 +0000 (22:33 +0200)]
bcm4908: backport upstream BQL support for bcm4908_enet

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit ae57770c956888337249688b9a16c25dd4fd63fb)
(cherry picked from commit 6198eb3e6448e9a43a32d3f46b7d0543424f455b)

2 years agobcm4908: backport bcm4908_enet fix for NULL dereference
Rafał Miłecki [Thu, 27 Oct 2022 19:05:20 +0000 (21:05 +0200)]
bcm4908: backport bcm4908_enet fix for NULL dereference

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 31e4e566545e53594bafe846c170a5d2fa6821e3)

2 years agobcm4908: optimize Ethernet driver by using build_skb()
Rafał Miłecki [Thu, 27 Oct 2022 16:57:39 +0000 (18:57 +0200)]
bcm4908: optimize Ethernet driver by using build_skb()

This should slightly improve performance thanks to the better cache
usage.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 6a02205a4d94a7b6a888ec55d1aecd60ebb20d77)

2 years agokernel: mtd: backport SafeLoader parser
Rafał Miłecki [Tue, 18 Oct 2022 20:37:46 +0000 (22:37 +0200)]
kernel: mtd: backport SafeLoader parser

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 711f1a8bcbdde1ee9e2934d707fb1765fc644268)

2 years agokernel: mtd: backport extended dynamic partitions support
Rafał Miłecki [Tue, 18 Oct 2022 20:12:27 +0000 (22:12 +0200)]
kernel: mtd: backport extended dynamic partitions support

This gets rid of "nvmem-cells" limitation. Dynamic partitions can be
defined for any (sub)partitions layout.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 4eda414b09c790344e47c1cebe78e5433b4dc10d)

2 years agoramips: rt3883: enable lzma-loader for Belkin F9K1109v1
Robert Senderek [Mon, 17 Oct 2022 19:15:35 +0000 (21:15 +0200)]
ramips: rt3883: enable lzma-loader for Belkin F9K1109v1

Fixes boot loader LZMA decompression issues

Fixes: #10968
Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
(cherry picked from commit ac296f621058119501ccd54e7cb2a243af5dc5a0)

2 years agomac80211: Update to version 5.10.149-1
Hauke Mehrtens [Sat, 15 Oct 2022 11:37:50 +0000 (13:37 +0200)]
mac80211: Update to version 5.10.149-1

This updates mac80211 to version 5.10.149-1 which is based on kernel
5.10.149.
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agokernel: mtd: fix unbalanced of_node_put() in dynamic partitions code
Rafał Miłecki [Tue, 18 Oct 2022 19:25:15 +0000 (21:25 +0200)]
kernel: mtd: fix unbalanced of_node_put() in dynamic partitions code

Fixes: edf3363959d3c ("kernel: backport mtd dynamic partition patch")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 76a470d5df971bd4c7309480a585d7fbaef63621)

2 years agokernel: bump 5.4 to 5.4.219
Hauke Mehrtens [Sat, 15 Oct 2022 11:32:03 +0000 (11:32 +0000)]
kernel: bump 5.4 to 5.4.219

Merged upstream:
 bcm53xx/patches-5.4/083-v6.0-clk-iproc-Do-not-rely-on-node-name-for-correct-PLL-s.patch

Compile-tested: x86/64
Run-tested: x86/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoOpenWrt v21.02.5: revert to branch defaults
Hauke Mehrtens [Sat, 15 Oct 2022 13:02:49 +0000 (15:02 +0200)]
OpenWrt v21.02.5: revert to branch defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoOpenWrt v21.02.5: adjust config defaults v21.02.5
Hauke Mehrtens [Sat, 15 Oct 2022 13:02:44 +0000 (15:02 +0200)]
OpenWrt v21.02.5: adjust config defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agomac80211: backport security fix and disable MBSSID support
Felix Fietkau [Thu, 13 Oct 2022 19:15:24 +0000 (21:15 +0200)]
mac80211: backport security fix and disable MBSSID support

Fixes: CVE-2022-41674
Fixes: CVE-2022-42719
Fixes: CVE-2022-42720
Fixes: CVE-2022-42721
Fixes: CVE-2022-42722
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agoOpenWrt v21.02.4: revert to branch defaults
Hauke Mehrtens [Sun, 9 Oct 2022 17:13:55 +0000 (19:13 +0200)]
OpenWrt v21.02.4: revert to branch defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoOpenWrt v21.02.4: adjust config defaults v21.02.4
Hauke Mehrtens [Sun, 9 Oct 2022 17:13:29 +0000 (19:13 +0200)]
OpenWrt v21.02.4: adjust config defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agofirmware: intel-microcode: update to 20220809
Christian Lamparter [Mon, 22 Aug 2022 08:35:28 +0000 (10:35 +0200)]
firmware: intel-microcode: update to 20220809

Debian's changelog by Henrique de Moraes Holschuh <hmh@debian.org>:

  * New upstream microcode datafile 20220809
    * Fixes INTEL-SA-00657, CVE-2022-21233
      Stale data from APIC leaks SGX memory (AEPIC leak)
    * Fixes unspecified errata (functional issues) on Xeon Scalable
    * Updated Microcodes:
      sig 0x00050653, pf_mask 0x97, 2022-03-14, rev 0x100015e, size 34816
      sig 0x00050654, pf_mask 0xb7, 2022-03-08, rev 0x2006e05, size 44032
      sig 0x000606a6, pf_mask 0x87, 2022-04-07, rev 0xd000375, size 293888
      sig 0x000706a1, pf_mask 0x01, 2022-03-23, rev 0x003c, size 75776
      sig 0x000706a8, pf_mask 0x01, 2022-03-23, rev 0x0020, size 75776
      sig 0x000706e5, pf_mask 0x80, 2022-03-17, rev 0x00b2, size 112640
      sig 0x000806c2, pf_mask 0xc2, 2022-03-19, rev 0x0028, size 97280
      sig 0x000806d1, pf_mask 0xc2, 2022-03-28, rev 0x0040, size 102400
      sig 0x00090672, pf_mask 0x03, 2022-06-07, rev 0x0022, size 216064
      sig 0x00090675, pf_mask 0x03, 2022-06-07, rev 0x0022, size 216064
      sig 0x000906a3, pf_mask 0x80, 2022-06-15, rev 0x0421, size 216064
      sig 0x000906a4, pf_mask 0x80, 2022-06-15, rev 0x0421, size 216064
      sig 0x000a0671, pf_mask 0x02, 2022-03-17, rev 0x0054, size 103424
      sig 0x000b06f2, pf_mask 0x03, 2022-06-07, rev 0x0022, size 216064
      sig 0x000b06f5, pf_mask 0x03, 2022-06-07, rev 0x0022, size 216064

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit bb73828b89def128f26ae1cdff0d08569d261f1b)

2 years agowireless-regdb: update to 2022-08-12
Nick Hainke [Sat, 17 Sep 2022 06:05:47 +0000 (08:05 +0200)]
wireless-regdb: update to 2022-08-12

Changes:
9dc9c89 wireless-regdb: update regulatory database based on preceding changes
442bc25 wireless-regdb: update 5 GHz rules for PK and add 60 GHz rule
daee7f3 wireless-regdb: add 5 GHz rules for GY

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 1d2d69c810261308652a577fc136e7327e0e1358)

2 years agowireless-regdb: bump to 2022.06.06
Stijn Tintel [Mon, 6 Jun 2022 16:11:33 +0000 (19:11 +0300)]
wireless-regdb: bump to 2022.06.06

  902b321 wireless-regdb: Update regulatory rules for Israel (IL)
  20f6f34 wireless-regdb: add missing spaces for US S1G rules
  25652b6 wireless-regdb: Update regulatory rules for Australia (AU)
  081873f wireless-regdb: update regulatory database based on preceding changes
  166fbdd wireless-regdb: add db files missing from previous commit
  e3f03f9 Regulatory update for 6 GHz operation in Canada (CA)
  888da5f Regulatory update for 6 GHz operation in United States (US)
  647bcaa Regulatory update for 6 GHz operation in FI
  c6b079d wireless-regdb: update regulatory rules for Bulgaria (BG) on 6GHz
  2ed39be wireless-regdb: Remove AUTO-BW from 6 GHz rules
  7a6ad1a wireless-regdb: Unify 6 GHz rules for EU contries
  68a8f2f wireless-regdb: update regulatory database based on preceding changes

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit e3e9eb31a281643737142e8e80c6f49204b5ba18)

2 years agowireless-regdb: update to version 2022.02.18
Sungbo Eo [Sat, 19 Feb 2022 01:46:01 +0000 (10:46 +0900)]
wireless-regdb: update to version 2022.02.18

e061299 wireless-regdb: Raise DFS TX power limit to 250 mW (24 dBm) for the US
2ce78ed wireless-regdb: Update regulatory rules for Croatia (HR) on 6GHz
0d39f4c wireless-regdb: Update regulatory rules for South Korea (KR)
acad231 wireless-regdb: Update regulatory rules for France (FR) on 6 and 60 GHz
ea83a82 wireless-regdb: add support for US S1G channels
4408149 wireless-regdb: add 802.11ah bands to world regulatory domain
5f3cadc wireless-regdb: Update regulatory rules for Spain (ES) on 6GHz
e0ac69b Revert "wireless-regdb: Update regulatory rules for South Korea (KR)"
40e5e80 wireless-regdb: Update regulatory rules for South Korea (KR)
e427ff2 wireless-regdb: Update regulatory rules for China (CN)
0970116 wireless-regdb: Update regulatory rules for the Netherlands (NL) on 6GHz
4dac44b wireless-regdb: update regulatory database based on preceding changes

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
(cherry picked from commit 19a90262df89f8419b058cf9a00dc9e8d465088b)

2 years agobuild: add support for python3.11 and higher
Oscar Molnar [Sat, 6 Aug 2022 15:13:41 +0000 (16:13 +0100)]
build: add support for python3.11 and higher

python3.11 beta is out but fails to run the makefile currently
this supports python versions from 3.6 to 3.99 with the python3 binary
it also checks specifically for 3.11 as it is the latest version out

Signed-off-by: Oscar Molnar <oscar@tymscar.com>
(cherry picked from commit a9e8eec221874e5840d659aed3f68850ff1d9982)
Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz> [rebase for 21.02]
2 years agokernel: bump 5.4 to 5.4.215
Hauke Mehrtens [Mon, 3 Oct 2022 18:40:59 +0000 (20:40 +0200)]
kernel: bump 5.4 to 5.4.215

Compile-tested: x86/64
Run-tested: x86/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agotreewide: fix security issues by bumping all packages using libwolfssl
Petr Štetiar [Thu, 29 Sep 2022 16:45:40 +0000 (18:45 +0200)]
treewide: fix security issues by bumping all packages using libwolfssl

As wolfSSL is having hard time maintaining ABI compatibility between
releases, we need to manually force rebuild of packages depending on
libwolfssl and thus force their upgrade. Otherwise due to the ABI
handling we would endup with possibly two libwolfssl libraries in the
system, including the patched libwolfssl-5.5.1, but still have
vulnerable services running using the vulnerable libwolfssl-5.4.0.

So in order to propagate update of libwolfssl to latest stable release
done in commit ec8fb542ec3e4 ("wolfssl: fix TLSv1.3 RCE in uhttpd by
using 5.5.1-stable (CVE-2022-39173)") which fixes several remotely
exploitable vulnerabilities, we need to bump PKG_RELEASE of all
packages using wolfSSL library.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit f1b7e1434f66a3cb09cb9e70b40add354a22e458)
(cherry picked from commit 562894b39da381264a34ce31e9334c8a036fa139)

2 years agowolfssl: fix TLSv1.3 RCE in uhttpd by using 5.5.1-stable (CVE-2022-39173)
Petr Štetiar [Wed, 28 Sep 2022 09:28:06 +0000 (11:28 +0200)]
wolfssl: fix TLSv1.3 RCE in uhttpd by using 5.5.1-stable (CVE-2022-39173)

Fixes denial of service attack and buffer overflow against TLS 1.3
servers using session ticket resumption. When built with
--enable-session-ticket and making use of TLS 1.3 server code in
wolfSSL, there is the possibility of a malicious client to craft a
malformed second ClientHello packet that causes the server to crash.

This issue is limited to when using both --enable-session-ticket and TLS
1.3 on the server side. Users with TLS 1.3 servers, and having
--enable-session-ticket, should update to the latest version of wolfSSL.

Thanks to Max at Trail of Bits for the report and "LORIA, INRIA, France"
for research on tlspuffin.

Complete release notes https://github.com/wolfSSL/wolfssl/releases/tag/v5.5.1-stable

Fixes: CVE-2022-39173
Fixes: https://github.com/openwrt/luci/issues/5962
References: https://github.com/wolfSSL/wolfssl/issues/5629
Tested-by: Kien Truong <duckientruong@gmail.com>
Reported-by: Kien Truong <duckientruong@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit ec8fb542ec3e4f584444a97de5ac05dbc2a9cde5)
(cherry picked from commit ce59843662961049a28033077587cabdc5243b15)

2 years agowolfssl: bump to 5.5.0
Ivan Pavlov [Wed, 31 Aug 2022 05:04:42 +0000 (08:04 +0300)]
wolfssl: bump to 5.5.0

Remove upstreamed: 101-update-sp_rand_prime-s-preprocessor-gating-to-match.patch

Some low severity vulnerabilities fixed
OpenVPN compatibility fixed (broken in 5.4.0)
Other fixes && improvements

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
(cherry picked from commit 3d88f26d74f7771b808082cef541ed8286c40491)
(cherry picked from commit 0c8425bf11590afb0c6f1545b328ecb6ed4aee87)

2 years agowolfssl: bump to 5.4.0
Eneas U de Queiroz [Fri, 15 Jul 2022 19:09:58 +0000 (16:09 -0300)]
wolfssl: bump to 5.4.0

This version fixes two vulnerabilities:
-CVE-2022-34293[high]: Potential for DTLS DoS attack
-[medium]: Ciphertext side channel attack on ECC and DH operations.

The patch fixing x86 aesni build has been merged upstream.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 9710fe70a68e0a004b1906db192d7a6c8f810ac5)
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit ade7c6db1e6c2c0c8d2338948c37cfa7429ebccc)

2 years agowolfssl: bump to v5.3.0-stable
Eneas U de Queiroz [Tue, 10 May 2022 19:39:11 +0000 (16:39 -0300)]
wolfssl: bump to v5.3.0-stable

This is mostly a bug fix release, including two that were already
patched here:
- 300-fix-SSL_get_verify_result-regression.patch
- 400-wolfcrypt-src-port-devcrypto-devcrypto_aes.c-remove-.patch

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 73c1fe2890baa5c0bfa46f53c5387f5e47de1acb)
(cherry picked from commit 6f8db8fee3b7bd5cb8b1b2be59ee710a8f96860b)

2 years agokernel: fix possible mtd NULL pointer dereference
Rafał Miłecki [Tue, 4 Oct 2022 10:04:37 +0000 (12:04 +0200)]
kernel: fix possible mtd NULL pointer dereference

Fixes: edf3363959d3c ("kernel: backport mtd dynamic partition patch")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit a5265497a4f6da158e95d6a450cb2cb6dc085cab)

2 years agobcm53xx: backport clk driver fix for DT nodes names
Rafał Miłecki [Thu, 29 Sep 2022 03:51:25 +0000 (05:51 +0200)]
bcm53xx: backport clk driver fix for DT nodes names

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 77d9cce604d32005ddb90e91c6cc9b9cf35068d7)

2 years agobuild: fix warnings from grep
Chris Osgood [Thu, 15 Sep 2022 12:09:38 +0000 (08:09 -0400)]
build: fix warnings from grep

Fixes build warnings when using newer versions of grep.

Signed-off-by: Chris Osgood <chris_github@functionalfuture.com>
Tested-by: Georgi Valkov <gvalkov@gmail.com>
(cherry picked from commit c5e167e0d6075c46ca92c30b425c4dcb05fec5ed)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agoMakefile: fix stray \ warnings with grep-3.8
Nick Hainke [Sun, 11 Sep 2022 06:15:52 +0000 (08:15 +0200)]
Makefile: fix stray \ warnings with grep-3.8

We simply grep for "/usr". So no need for "-E" or "\/". Furthermore, in
the new grep versions this creates warnings.

As written in the grep-3.8 announcement:
  Regular expressions with stray backslashes now cause warnings, as
  their unspecified behavior can lead to unexpected results.
  For example, '\a' and 'a' are not always equivalent
  <https://bugs.gnu.org/39678>.

Fixes warnings in the form of:
  grep: warning: stray \ before /

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit a29d3bc48c40c6a2a93ae1806bea2ac26455cdbb)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agomt7620: fix missing kernel config symbol
Federico Capoano [Thu, 15 Sep 2022 17:53:36 +0000 (19:53 +0200)]
mt7620: fix missing kernel config symbol

Fixes following missing kernel config symbol after adding GPIO watchdog:

  Software watchdog (SOFT_WATCHDOG) [M/n/y/?] m
  Watchdog device controlled through GPIO-line (GPIO_WATCHDOG) [Y/n/m/?] y
    Register the watchdog as early as possible (GPIO_WATCHDOG_ARCH_INITCALL) [N/y/?] (NEW)

Fixes: 1a97c03d864e ("rampis: feed zbt-we1026 external watchdog")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit fb2801b82c06878ae2ad20b8f95546c34ed3cdf4)

[adapted to config-5.4]

Signed-off-by: Federico Capoano <f.capoano@openwisp.io>
2 years agorampis: feed zbt-we1026 external watchdog
Federico Capoano [Thu, 15 Sep 2022 17:52:14 +0000 (19:52 +0200)]
rampis: feed zbt-we1026 external watchdog

Without feeding the gpio watchdog, the board will reset after 90 seconds

Signed-off-by: Arvid E. Picciani <aep@exys.org>
(cherry picked from commit 1a97c03d864ee5ab917aff2988c62fce223c041e)

[adapted to config-5.4]

Signed-off-by: Federico Capoano <f.capoano@openwisp.io>
2 years agobase-files: add support for heartbeat led trigger
Alexey Smirnov [Tue, 4 Jan 2022 07:11:51 +0000 (10:11 +0300)]
base-files: add support for heartbeat led trigger

This patch adds support for creation heartbeat led trigger with,
for example, this command:

ucidef_set_led_heartbeat "..." "..." "..."

from /etc/board.d/01_leds.

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
(cherry picked from commit 66071729a27919e555752fce25210b1b035eb319)

2 years agoscripts/download.pl: fix downloads with wget
Petr Štetiar [Tue, 13 Sep 2022 05:40:37 +0000 (07:40 +0200)]
scripts/download.pl: fix downloads with wget

Several users of wget for downloads (curl is not available in the
system) have reported broken download functionality:

 wget --tries=5 --timeout=20 --output-document=-  https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.142.tar.xz
 http://: Invalid host name.

Thats all happening due to '' was passed as an argument, which got later
expanded to http://.

In the context of a list constructor '' is not nothing, it is an empty
string element.  So fix it by using () as it will yield "nothing" and
thus not introduce an empty string element.

Fixes: #10692
Fixes: 90c6e3aedf16 ("scripts: always check certificates")
Signed-off-by: Jo-Philipp Wich <jo@mein.io> [shellwords() -> ()]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 50a48faa1b8424e6b4b436b7118fffa2cba14b18)

2 years agoscripts/download.pl: silence can't exec curl warning
Petr Štetiar [Tue, 13 Sep 2022 05:38:10 +0000 (07:38 +0200)]
scripts/download.pl: silence can't exec curl warning

When running build in verbose mode `make V=s` we can see a lot of
following warnings when curl is not available in the system:

 Can't exec "curl": No such file or directory at scripts/download.pl line 77.

So lets fix it by redirecting of the stderr to null hole.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit c836ca84e8f641e10a8349a8f9b7432b33d6cec1)