openwrt/staging/pepe2k.git
22 months agotools/patchelf: update to 0.17.2
Linhui Liu [Thu, 12 Jan 2023 08:27:06 +0000 (16:27 +0800)]
tools/patchelf: update to 0.17.2

Changes from version 0.17.1 to version 0.17.2:
- fix incorrect version in 0.17.1

Changes from version 0.17.0 to version 0.17.1:
- Also pass STRIP to the tests
- Fix Out-of-bounds read in the function modifySoname
- Split segment size fix

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
22 months agotools/llvm: update to 15.0.7
Linhui Liu [Thu, 12 Jan 2023 10:29:09 +0000 (18:29 +0800)]
tools/llvm: update to 15.0.7

Release Notes:
    https://discourse.llvm.org/t/llvm-15-0-7-release/67638

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
22 months agokernel: bump 5.15 to 5.15.87
John Audia [Thu, 12 Jan 2023 12:19:14 +0000 (07:19 -0500)]
kernel: bump 5.15 to 5.15.87

Removed upstreamed:
  generic/hack-5.15/290-net-dsa-mv88e6xxx-depend-on-PTP-conditionally.patch[1]

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.87&id=945e58bdaf6faf6e3f957d182244fa830acddab4

Signed-off-by: John Audia <therealgraysky@proton.me>
22 months agotrace-cmd: update to v3.1.6
Nick Hainke [Tue, 10 Jan 2023 15:16:09 +0000 (16:16 +0100)]
trace-cmd: update to v3.1.6

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agolibtracefs: update to 1.6.4
Nick Hainke [Tue, 10 Jan 2023 15:13:33 +0000 (16:13 +0100)]
libtracefs: update to 1.6.4

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agolibtraceevent: update to 1.7.1
Nick Hainke [Tue, 10 Jan 2023 15:11:21 +0000 (16:11 +0100)]
libtraceevent: update to 1.7.1

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agoarchs38: enable 5.15 testing kernel
Nick Hainke [Thu, 5 Jan 2023 20:31:51 +0000 (21:31 +0100)]
archs38: enable 5.15 testing kernel

Add 5.15 as testing kernel.

Tested-by: Evgeniy Didin <didin@synopsys.com>
Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agoarchs38: 5.15: copy config from 5.10
Nick Hainke [Thu, 5 Jan 2023 20:03:24 +0000 (21:03 +0100)]
archs38: 5.15: copy config from 5.10

Copy config from 5.10 to 5.15.

Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agouboot-mediatek: update to U-Boot 2023.01
Daniel Golle [Fri, 13 Jan 2023 03:13:24 +0000 (03:13 +0000)]
uboot-mediatek: update to U-Boot 2023.01

Support for MT7981 and MT7986 has been merged, remove patches.
Tested on a couple of MT7986, MT7622 and MT7623 boards.
MIPS builds are untested.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
22 months agouboot-envtools: update to 2023.01
Linhui Liu [Thu, 12 Jan 2023 15:03:58 +0000 (23:03 +0800)]
uboot-envtools: update to 2023.01

Update to latest version.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
22 months agotools/mkimage: update to 2023.01
Linhui Liu [Thu, 12 Jan 2023 10:10:02 +0000 (18:10 +0800)]
tools/mkimage: update to 2023.01

Remove upstreamed patches:
- 020-tools-mtk_image-split-gfh-header-verification-into-a.patch
- 021-tools-mtk_image-split-the-code-of-generating-NAND-he.patch
- 022-tools-mtk_image-add-support-for-nand-headers-used-by.patch

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
22 months agomac80211: ath11k: fix monitor bringup
Robert Marko [Wed, 11 Jan 2023 21:42:34 +0000 (22:42 +0100)]
mac80211: ath11k: fix monitor bringup

Currently, ath11k will crash the crash if we try to bringup the monitor
mode interface.
Luckily, it has already been fixed upstream, so backport the patches
fixing it.

Fixes: 93ae4353cdf6 ("mac80211: add ath11k PCI support")
Signed-off-by: Robert Marko <robimarko@gmail.com>
22 months agoscripts/dl_github_archieve.py: fix generating unreproducible tar
Christian Marangi [Thu, 12 Jan 2023 13:46:58 +0000 (14:46 +0100)]
scripts/dl_github_archieve.py: fix generating unreproducible tar

Allign dl_github_archieve.py to 8252511dc0b5a71e9e64b96f233a27ad73e28b7f
change. On supported system the sigid bit is applied to files and tar
archieve that on tar creation. This cause unreproducible tar for these
system and these bit should be dropped to produce reproducible tar.

Add the missing option following the command options used in other
scripts.

Fixes: 75ab064d2b38 ("build: download code from github using archive API")
Suggested-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Tested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agolldpd: use release tar instead of codeload
Christian Marangi [Thu, 12 Jan 2023 00:05:44 +0000 (01:05 +0100)]
lldpd: use release tar instead of codeload

There is currently a problem with making reproducible version of lldpd.
The tool version is generated based on 3 source:
1. .dist-version file in release tar
2. git hash with presence of .git directory
3. current date

Using the codeload tar from github results in getting the repo without
the .git directory and since they are not release tar, we don't have
.dist-version. This results in having lldpd bin with a version set to
the current build time.

Switch to release tar so that we correctly have a .dist-version file and
the version is not based on the build time.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
22 months agoCI: remove pcre from macOS
Rosen Penev [Sun, 8 Jan 2023 20:05:29 +0000 (12:05 -0800)]
CI: remove pcre from macOS

ff02e1561f2073b39814f2d73205a5209471b115 added a host version of pcre
for packages that need it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
22 months agoCI: remove already installed packages
Rosen Penev [Sun, 8 Jan 2023 20:04:41 +0000 (12:04 -0800)]
CI: remove already installed packages

The GitHub image already includes these.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
22 months agoCI: remove various tools from macOS
Rosen Penev [Sat, 31 Dec 2022 02:58:19 +0000 (18:58 -0800)]
CI: remove various tools from macOS

zstd, openssl, and quilt are already built in tools/. No need to install
them.

The rest are unused.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
22 months agoksmbd: Fix ZDI-CAN-18259
Hauke Mehrtens [Sat, 7 Jan 2023 13:41:04 +0000 (14:41 +0100)]
ksmbd: Fix ZDI-CAN-18259

This fixes a security problem in ksmbd. It currently has the
ZDI-CAN-18259 ID assigned, but no CVE yet.

Backported from:
https://github.com/cifsd-team/ksmbd/commit/8824b7af409f51f1316e92e9887c2fd48c0b26d6
https://github.com/cifsd-team/ksmbd/commit/cc4f3b5a6ab4693aba94a45cc073188df4d67175

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agolantiq: xrx200: Fix wifi LED on o2 box 6431
Florian Maurer [Tue, 10 Jan 2023 12:39:50 +0000 (13:39 +0100)]
lantiq: xrx200: Fix wifi LED on o2 box 6431

Wifi LED did not work using phy0radio, which somehow slipped through in
the previous testing

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
22 months agomvebu: backport upstream patch to fix COMPHY reset
Michal Hrusecky [Mon, 9 Jan 2023 14:59:02 +0000 (15:59 +0100)]
mvebu: backport upstream patch to fix COMPHY reset

Upstream commit [1] included in the Linux kernel version 6.2 was
backported to Linux kernels 6.1.4, 6.0.18. It should be possible that it
is going to be backported even to the 5.15 series, but before it happens,
let's include it here.

It was discovered that on SOC Marvell Armada 3720, which is using e.g.
Turris MOX, and if you are also using it with older ARM Trusted Firmware
v1.5, it is not possible to detect connected USB 3.0 devices, but they
are working just fine when connected with USB 2.0 cable. This patch
fixes it.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/phy/marvell/phy-mvebu-a3700-comphy.c?id=b01d622d76134e9401970ffd3fbbb9a7051f976a

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[improve commit description, added tag to the patch]

22 months agoCI: kernel: test each target with additional changes than target/linux
Christian Marangi [Wed, 11 Jan 2023 15:24:37 +0000 (16:24 +0100)]
CI: kernel: test each target with additional changes than target/linux

Test each target if there are additional changes than target/linux.
This is needed to do wide test with changes to kmods, include/kernel and
changes to the workflow files.

While at it also cleanup and rework the code to drop duplication.
Also drop since_last_remote_commit to better track changes.

Fixes: 04ada8bc4118 ("CI: kernel: build only changed targets")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoat91: sam9x,sama5: fix racy SD card image generation
Petr Štetiar [Tue, 3 Jan 2023 11:44:51 +0000 (12:44 +0100)]
at91: sam9x,sama5: fix racy SD card image generation

We've few low spec (make -j3) build workers attached to the 22.03
buildbot instance which from time to time exhibit following build
failure during image generation (shortened for brewity):

 + dd bs=512 if=root.ext4 of=openwrt-22.03...sdcard.img.gz.img
 dd: failed to open 'root.ext4': No such file or directory

Thats happening likely due to the fact, that on buildbots we've
`TARGET_PER_DEVICE_ROOTFS=y` which produces differently named filesystem
image in the SD card image target dependency chain:

 make_ext4fs -L rootfs ... root.ext4+pkg=68b329da

and that hardcoded `root.ext4` image filename becomes available from
other Make targets in the later stages. So lets fix this issue by using
IMAGE_ROOTFS Make variable which should contain proper path to the root
filesystem image.

Fixing remaining subtargets ommited in commit 5c3679e39b61 ("at91:
sama7: fix racy SD card image generation").

Fixes: 5c3679e39b61 ("at91: sama7: fix racy SD card image generation")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
22 months agox86: Add APU6 board support for startup detection
Philip Prindeville [Fri, 30 Dec 2022 18:17:10 +0000 (11:17 -0700)]
x86: Add APU6 board support for startup detection

The APU6 is similar to the APU4 except for eth0 having
an SFP cage instead of RJ45.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
22 months agox86: Add definitions for APU6 platform
Philip Prindeville [Fri, 30 Dec 2022 18:03:47 +0000 (11:03 -0700)]
x86: Add definitions for APU6 platform

The board is similar to an APU4 except it has an SFP cage for eth0.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [patch refresh]
22 months agoat91: sama7: fix racy SD card image generation
Petr Štetiar [Tue, 3 Jan 2023 11:44:51 +0000 (12:44 +0100)]
at91: sama7: fix racy SD card image generation

We've few low spec (make -j3) build workers attached to the 22.03
buildbot instance which from time to time exhibit following build
failure during image generation:

 + dd bs=512 if=root.ext4 of=openwrt-22.03-snapshot-r20028-43d71ad93e-at91-sama7-microchip_sama7g5-ek-ext4-sdcard.img.gz.img seek=135168 conv=notrunc
 dd: failed to open 'root.ext4': No such file or directory

Thats likely due to the fact, that on buildbots we've
`TARGET_PER_DEVICE_ROOTFS=y` which produces differently named filesystem
image in the SD card image target dependency chain:

 make_ext4fs -L rootfs ... root.ext4+pkg=68b329da

and that hardcoded root.ext4 becomes available from other target in the
later stages. So lets fix this issue by using IMAGE_ROOTFS Make variable
which should contain proper path to the root filesystem image.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
22 months agoCI: add concurrency limits for pr test
Christian Marangi [Wed, 11 Jan 2023 12:52:38 +0000 (13:52 +0100)]
CI: add concurrency limits for pr test

Add concurrency limits for pull request test so that on pull request
refresh old jobs are cancelled.

The group is created based on the github ref + workflow name and the
workflow is cancelled only it it comes from a pull_request event.
Push events are not affected by this limit.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoRevert "TODROP: test for ipq4019 target"
Christian Marangi [Wed, 11 Jan 2023 13:29:44 +0000 (14:29 +0100)]
Revert "TODROP: test for ipq4019 target"

This reverts commit 4eb587f7e0a49b9c404857b18571f45981b3a7fc.

Pushed by mistake while merging a pr using script.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoTODROP: test for ipq4019 target
Christian Marangi [Tue, 10 Jan 2023 23:07:57 +0000 (00:07 +0100)]
TODROP: test for ipq4019 target

COMMIT TO DROP

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoCI: kernel: build only changed targets
Christian Marangi [Tue, 10 Jan 2023 22:20:07 +0000 (23:20 +0100)]
CI: kernel: build only changed targets

Detect changes in commit and build only changed targets.
If a change is related to the generic target, build test each target.

The matrix json is split. For target check patch only the first
subtarget is selected, for build test each target subtarget is built.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoCI: build: fallback to compile toolchain if external toolchain fail
Christian Marangi [Tue, 10 Jan 2023 22:51:32 +0000 (23:51 +0100)]
CI: build: fallback to compile toolchain if external toolchain fail

If for whatever reason external toolchain can't be found or downloaded,
fallback to internal toolchain build.

This can be useful when new target are introduced and external toolchain
are not present in openwrt fileserver.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoipq806x: refresh upstreamed patch with kernel version tag
Christian Marangi [Tue, 10 Jan 2023 19:10:28 +0000 (20:10 +0100)]
ipq806x: refresh upstreamed patch with kernel version tag

Refresh upstreamed patch with kernel version tag and replace them with
the upstream version.

For krait-cc patch rework them with the upstream changes.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoprereq-build: limit argp/fts/obstack/libintl.h to Linux OS
Christian Marangi [Mon, 9 Jan 2023 21:16:26 +0000 (22:16 +0100)]
prereq-build: limit argp/fts/obstack/libintl.h to Linux OS

BSD based OS have different fixup and doesn't require these header.
Limit these Header to Linux based OS.

Fixes: 36bc306ae611 ("prereq-build: add extra check for elfutils required header")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoiwinfo: update to latest Git HEAD
Christian Marangi [Fri, 6 Jan 2023 14:23:28 +0000 (15:23 +0100)]
iwinfo: update to latest Git HEAD

c7b420a devices: add Qualcomm Atheros QCN6024/9024/9074 cards
5914d71 iwinfo: devices: add Qualcomm Atheros IPQ8074 WiSoC

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agotreewide: derive host and hostpkg path from STAGING_DIR
Christian Marangi [Fri, 2 Dec 2022 19:56:12 +0000 (20:56 +0100)]
treewide: derive host and hostpkg path from STAGING_DIR

STAGING_DIR may be provided from command line. We currently hardcoded
STAGING_DIR_HOST and STAGING_DIR_HOSTPKG to the default location but we
currently have some relocatable patch that derive the path from
STAGING_DIR.

Fix this and correctly derive STAGING_DIR_HOST and STAGING_DIR_HOSTPKG
from STAGING_DIR.

The intention is to fix inconsistency from the relocatable patch and the
use of STAGING_DIR_HOST that is always hardcoded.
This with a wrong configuration may end up in broken state with some
host tools expecing a PATH from STAGING_DIR and others using library
from the default staging_dir/host path.

To save downstream project the original implementation is saved while
fixing the inconsistency between patch and .mk.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agotoolchain/gdb: use STAGING_DIR_HOST instead of hardcoding default
Christian Marangi [Fri, 2 Dec 2022 19:33:14 +0000 (20:33 +0100)]
toolchain/gdb: use STAGING_DIR_HOST instead of hardcoding default

Use STAGING_DIR_HOST to reference staging host directory instead of
hardcoding it to default path.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agotoolchain/gcc: use STAGING_DIR_HOST instead of hardcoding default
Christian Marangi [Fri, 2 Dec 2022 19:31:38 +0000 (20:31 +0100)]
toolchain/gcc: use STAGING_DIR_HOST instead of hardcoding default

Use STAGING_DIR_HOST to reference staging host directory instead of
hardcoding it to default path.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agotools/mpc: use STAGING_DIR_HOST instead of hardcoding default
Christian Marangi [Fri, 2 Dec 2022 19:13:06 +0000 (20:13 +0100)]
tools/mpc: use STAGING_DIR_HOST instead of hardcoding default

Use STAGING_DIR_HOST to reference the staging dir for host tools instead
of hardcoding it to the default location.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agolibtool: use STAGING_DIR_HOST in relocatable patch
Christian Marangi [Thu, 10 Nov 2022 16:48:54 +0000 (17:48 +0100)]
libtool: use STAGING_DIR_HOST in relocatable patch

Instead of using STAGING_DIR and then go up one dir with '../' use
directly STAGING_DIR_HOST env variable. This should produce cleaner
symbolic links.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoautoconf: use STAGING_DIR_HOST in relocatable patch
Christian Marangi [Thu, 10 Nov 2022 16:47:06 +0000 (17:47 +0100)]
autoconf: use STAGING_DIR_HOST in relocatable patch

Instead of using STAGING_DIR and then go up one dir with '../' use
directly STAGING_DIR_HOST env variable. This should produce cleaner
symbolic links.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoautomake: use STAGING_DIR_HOST in relocatable patch
Christian Marangi [Thu, 10 Nov 2022 16:44:13 +0000 (17:44 +0100)]
automake: use STAGING_DIR_HOST in relocatable patch

Instead of using STAGING_DIR and then go up one dir with '../' use
directly STAGING_DIR_HOST env variable. This should produce cleaner
symbolic links.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agotoolchain/gcc: fix broken gcc version selection
Christian Marangi [Mon, 9 Jan 2023 20:19:02 +0000 (21:19 +0100)]
toolchain/gcc: fix broken gcc version selection

Config evaluation require default with if to be put before the generic
default config with no condition. Putting the default config before any
conditional default results in always selecting the non conditional one.

This results in the version be hardcoded to gcc 12 even if gcc 11 is
selected in the Advanced build options.

Fix this by putting the gcc 12 default option as last after ANY
conditional default config.

Fixes: d9de5252a44e ("toolchain/gcc: switch to version 12 by default")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoprereq-build: add extra check for elfutils required header
Christian Marangi [Mon, 9 Jan 2023 13:24:49 +0000 (14:24 +0100)]
prereq-build: add extra check for elfutils required header

While testing tools build on an alpine image it was found that with musl
libc some header are missing for elfutils tool.

Add extra prereq-build check to make sure these header are present in
the system to correctly compile host tools.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoprereq-build: use RequireCHeader test for ncurses prereq
Christian Marangi [Mon, 9 Jan 2023 17:40:00 +0000 (18:40 +0100)]
prereq-build: use RequireCHeader test for ncurses prereq

RequireCHeader is a generilized version of the ncurses prereq test. Use
that indetad.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoinclude/prereq.mk: add RequireCHeader helper
Christian Marangi [Mon, 9 Jan 2023 13:23:23 +0000 (14:23 +0100)]
include/prereq.mk: add RequireCHeader helper

Add RequireCHeader helper that will try to compile a fake c program with
the requested header included.

This is useful to check if a specific header is present in the system
without checking for the specific path.

This is a generilized version of the current ncurses test.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agosunxi: switch to kernel 5.15
Stijn Tintel [Mon, 9 Jan 2023 15:24:21 +0000 (17:24 +0200)]
sunxi: switch to kernel 5.15

The testing kernel has been available since early 2022, and is running
fine for several people. Let's switch to it by default.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Karl Palsson <karlp@etactica.com>
Tested-by: Jan-Niklas Burfeind <openwrt@aiyionpri.me>
22 months agoqoriq: drop unused kernel config
Stijn Tintel [Mon, 9 Jan 2023 15:30:42 +0000 (17:30 +0200)]
qoriq: drop unused kernel config

While switching qoriq to kernel 5.15, the config for kernel 5.10 was
left behind. Drop it.

Fixes: 230f2fccd14e ("qoriq: switch to kernel 5.15")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
22 months agoucode-mod-bpf: add new package for a ucode libbpf binding
Felix Fietkau [Sun, 8 Jan 2023 19:40:40 +0000 (20:40 +0100)]
ucode-mod-bpf: add new package for a ucode libbpf binding

The bpf plugin provides functionality for loading and interacting with
eBPF modules.

It allows loading full modules and pinned maps/programs and supports
interacting with maps and attaching programs as tc classifiers.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
22 months agoucode: update to the latest version
Felix Fietkau [Sun, 8 Jan 2023 19:38:40 +0000 (20:38 +0100)]
ucode: update to the latest version

34cfbb922c96 README.md: various spelling and documentation fixes
ff32355ea645 build: make rtnl/nl80211 depend on linux instead of !APPLE
c0e413c21f7b include: add uc_fn_thisval()
1e4d20932646 Merge pull request #134 from nbd168/thisval

Signed-off-by: Felix Fietkau <nbd@nbd.name>
22 months agoci: show_build_failures: fix missing output for configure failures
Petr Štetiar [Mon, 9 Jan 2023 09:49:35 +0000 (10:49 +0100)]
ci: show_build_failures: fix missing output for configure failures

We're currently missing log output in cases where `configure` fails
which returns 77 as its error code:

 make[3]: *** [Makefile:118: elfutils-0.188/.configured_889556d2f423f99e091beece9c8d870a] Error 77

So lets adjust the regexps so they can handle multiple digits.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
22 months agotoolchain/gcc: switch to version 12 by default
Hauke Mehrtens [Mon, 19 Dec 2022 00:47:48 +0000 (01:47 +0100)]
toolchain/gcc: switch to version 12 by default

This was build tested with all core packages on all targets
successfully.

Most packages from the feed are also building fine.

This was run tested on the following systems:
* lantiq/xrx200 musl
* pistachio/generic musl
* sunxi/cortexa53 musl
* x86/64 musl
* x86/64 glibc
* armvirt/64 musl

The size of the images stays more or less the same for MIPS BE and
aarch64. I haven't tested other architectures.

With GCC 11 I got these sizes for lantiq/xrx200:
7,219,848 openwrt-lantiq-xrx200-tplink_tdw8970-initramfs-kernel.bin
7,472,208 openwrt-lantiq-xrx200-tplink_tdw8970-squashfs-sysupgrade.bin

With GCC 12 I got these sizes for lantiq/xrx200:
7,217,355 openwrt-lantiq-xrx200-tplink_tdw8970-initramfs-kernel.bin
7,406,674 openwrt-lantiq-xrx200-tplink_tdw8970-squashfs-sysupgrade.bin

The sysupgrade image is probably padded. The initramfs image is 0.03% smaller.

With GCC 11 I got these sizes for armvirt/64:
 4,143,943 openwrt-armvirt-64-default-rootfs.tar.gz
10,887,176 openwrt-armvirt-64-Image
24,911,880 openwrt-armvirt-64-Image-initramfs
 4,141,572 openwrt-armvirt-64-rootfs.cpio.gz
 4,255,854 openwrt-armvirt-64-rootfs-ext4.img.gz
 3,391,178 openwrt-armvirt-64-rootfs-squashfs.img.gz

With GCC 12 I got these sizes for armvirt/64:
 4,142,778 openwrt-armvirt-64-default-rootfs.tar.gz
10,887,176 openwrt-armvirt-64-Image
24,911,880 openwrt-armvirt-64-Image-initramfs
 4,138,105 openwrt-armvirt-64-rootfs.cpio.gz
 4,255,463 openwrt-armvirt-64-rootfs-ext4.img.gz
 3,390,390 openwrt-armvirt-64-rootfs-squashfs.img.gz

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agotoolchain/gcc: Fix GCC version check
Hauke Mehrtens [Mon, 19 Dec 2022 23:58:19 +0000 (00:58 +0100)]
toolchain/gcc: Fix GCC version check

The version check which sets GCC_VERSION_FILE to the correct value only
worked when the advanced options menu was active and not when it was not
active.

Thank you Tony Butler for the fix.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agortl8812au-ct: Ignore address errors
Hauke Mehrtens [Mon, 19 Dec 2022 00:40:04 +0000 (01:40 +0100)]
rtl8812au-ct: Ignore address errors

GCC 12.2.0 shows these error messages:
````
rtl8812au-ct-2021-11-07-39df5596/core/rtw_sta_mgt.c: In function 'rtw_mfree_stainfo':
rtl8812au-ct-2021-11-07-39df5596/core/rtw_sta_mgt.c:210:24: error: the comparison will always evaluate as 'true' for the address of 'lock' will never be NULL [-Werror=address]
  210 |         if(&psta->lock != NULL)
      |                        ^~
In file included from rtl8812au-ct-2021-11-07-39df5596/include/drv_types.h:109,
                 from rtl8812au-ct-2021-11-07-39df5596/core/rtw_sta_mgt.c:22:
rtl8812au-ct-2021-11-07-39df5596/include/sta_info.h:95:17: note: 'lock' declared here
   95 |         _lock   lock;
      |                 ^~~~
````

````
  CC [M]  rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.o
rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.c: In function 'cfg80211_rtw_scan':
rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.c:2176:32: warning: the comparison will always evaluate as 'true' for the address of 'ssid' will never be NULL [-Waddress]
 2176 |                 if(ssids->ssid != NULL
      |                                ^~
In file included from rtl8812au-ct-2021-11-07-39df5596/include/osdep_service_linux.h:88,
                 from rtl8812au-ct-2021-11-07-39df5596/include/osdep_service.h:41,
                 from rtl8812au-ct-2021-11-07-39df5596/include/drv_types.h:32,
                 from rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.c:22:
/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/include/mac80211/net/cfg80211.h:2364:12: note: 'ssid' declared here
 2364 |         u8 ssid[IEEE80211_MAX_SSID_LEN];
      |            ^~~~
````

````
  CC [M]  rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.o
rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.c: In function 'phydm_cmd_parser':
rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.c:873:28: warning: the comparison will always evaluate as 'true' for the pointer operand in 'input + ((sizetype)i + 1) * 16' must not be NULL [-Waddress]
  873 |                         if(input[i+1]) {
      |                            ^~~~~
rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.c:894:28: warning: the comparison will always evaluate as 'true' for the pointer operand in 'input + ((sizetype)i + 1) * 16' must not be NULL [-Waddress]
  894 |                         if(input[i+1]) {
      |                            ^~~~~
````

This one was only seen on the rockchip/armv8 target:
````
  CC [M]  rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.o
In function '__nat25_add_pppoe_tag',
    inlined from 'nat25_db_handle' at rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c:909:10:
rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c:118:9: error: 'memcpy' reading between 2052 and 9220 bytes from a region of size 40 [-Werror=stringop-overread]
  118 |         memcpy((unsigned char *)ph->tag, tag, data_len);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c: In function 'nat25_db_handle':
rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c:878:63: note: source object 'tag_buf' of size 40
  878 |                                                 unsigned char tag_buf[40];
      |                                                               ^~~~~~~
````

Most of them are looking like real errors to me, but some fixes need a
deeper understanding of the driver and probably bigger changes to the driver.

Ignore these error messages for now. It would be nice if someone would
fix them.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agouqmi: Ignore wrong maybe-uninitialized and dangling-pointer error
Hauke Mehrtens [Mon, 19 Dec 2022 00:19:32 +0000 (01:19 +0100)]
uqmi: Ignore wrong maybe-uninitialized and dangling-pointer error

GCC 12.2.0 shows this false positive error message:
````
uqmi-2022-05-04-56cb2d40/dev.c: In function 'qmi_request_wait':
uqmi-2022-05-04-56cb2d40/dev.c:217:23: error: storing the address of local variable 'complete' in '*req.complete' [-Werror=dangling-pointer=]
  217 |         req->complete = &complete;
      |         ~~~~~~~~~~~~~~^~~~~~~~~~~
uqmi-2022-05-04-56cb2d40/dev.c:208:14: note: 'complete' declared here
  208 |         bool complete = false;
      |              ^~~~~~~~
uqmi-2022-05-04-56cb2d40/dev.c:208:14: note: 'req' declared here
cc1: all warnings being treated as errors
````

and this one:
````
In file included from uqmi-2022-05-04-56cb2d40/commands.c:28:
In function 'blobmsg_close_table',
    inlined from 'cmd_nas_get_cell_location_info_cb' at /home/haukeuqmi-2022-05-04-56cb2d40/commands-nas.c:897:4:
/usr/include/libubox/blobmsg.h:256:9: error: 'c' may be used uninitialized [-Werror=maybe-uninitialized]
  256 |         blob_nest_end(buf, cookie);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from uqmi-2022-05-04-56cb2d40/commands.c:169:
uqmi-2022-05-04-56cb2d40/commands-nas.c: In function 'cmd_nas_get_cell_location_info_cb':
uqmi-2022-05-04-56cb2d40/commands-nas.c:713:15: note: 'c' was declared here
  713 |         void *c, *t, *cell, *freq;
      |               ^
cc1: all warnings being treated as errors
````

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agoelfutils: Ignore wrong use-after-free error
Hauke Mehrtens [Mon, 19 Dec 2022 00:07:38 +0000 (01:07 +0100)]
elfutils: Ignore wrong use-after-free error

GCC 12.2.0 shows this false positive error message:
````
In function 'bigger_buffer',
    inlined from '__libdw_gunzip' at gzip.c:374:12:
gzip.c:96:9: error: pointer may be used after 'realloc' [-Werror=use-after-free]
   96 |     b = realloc (state->buffer, more -= 1024);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gzip.c:94:13: note: call to 'realloc' here
   94 |   char *b = realloc (state->buffer, more);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
````

GCC bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agolayerscape: Add CONFIG_NVMEM_LAYERSCAPE_SFP kernel configuration option
Hauke Mehrtens [Sun, 8 Jan 2023 17:51:27 +0000 (18:51 +0100)]
layerscape: Add CONFIG_NVMEM_LAYERSCAPE_SFP kernel configuration option

The kernel configuration option is now available on kernel 5.10 and
5.15, add it to the config for 5.15 too.

Fixes: 8dfe69cdfc5c ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agoat91: Add CONFIG_NVMEM_MICROCHIP_OTPC kernel configuration option
Hauke Mehrtens [Sun, 8 Jan 2023 15:09:04 +0000 (16:09 +0100)]
at91: Add CONFIG_NVMEM_MICROCHIP_OTPC kernel configuration option

The kernel configuration option is now available on kernel 5.10 and
5.15, add it to the config for 5.15 too.

Fixes: 8dfe69cdfc5c ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agokernel: Refresh kernel patches
Hauke Mehrtens [Sun, 8 Jan 2023 13:55:44 +0000 (14:55 +0100)]
kernel: Refresh kernel patches

Make the patches apply cleanly again.

Fixes: 8dfe69cdfc5c ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agorealtek: dgs-1210-10mp: add full sfp description
Daniel Groth [Fri, 14 Oct 2022 14:23:33 +0000 (16:23 +0200)]
realtek: dgs-1210-10mp: add full sfp description

Added the full SFP description for both SFP ports (lan9, 10) on D-Link
DGS-1210-10MP, which enables hot-plug detection of SFP modules.
Added the patch to both kernel 5.10 and 5.15 dts files.

Signed-off-by: Daniel Groth <flygarn12@gmail.com>
22 months agoramips: do not use GPIO function on switch pins on certain devices
Arınç ÜNAL [Wed, 19 Oct 2022 11:43:00 +0000 (14:43 +0300)]
ramips: do not use GPIO function on switch pins on certain devices

The pins of the MT7530 switch that translate to GPIO 0, 3, 6, 9 and 12 has
got a function, by default, which does the same thing as the netdev
trigger. Because of bridge offloading on DSA, the netdev trigger won't see
the frames between the switch ports whilst the default function will.

Do not use the GPIO function on switch pins on devices that fall under this
category.

Keep it for:

mt7621_belkin_rt1800.dts: There's only one LED which is for the wan
interface and there's no bridge offloading between the "wan" interface and
other interfaces.

mt7621_yuncore_ax820.dts: There's no bridge offloading between the "wan"
and "lan" interfaces.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
22 months agoramips: add support for D-Link DAP-X1860 A1
Sebastian Schaper [Sat, 7 Jan 2023 12:45:44 +0000 (13:45 +0100)]
ramips: add support for D-Link DAP-X1860 A1

The DAP-X1860 is a wall-plug AX1800 repeater.

Specifications:
- MT7621, 256 MiB RAM, 128 MiB SPI NAND
- MT7915 + MT7975 2x2 802.11ax (DBDC)
- Ethernet: 1 port 10/100/1000
- LED RSSI bargraph (2x green, 1x red/orange), status
  and RSSI LEDs are incorrectly populated red/orange
  (should be red/green according to documentation)

Installation:
- Keep reset button pressed during plug-in
- Web Recovery Updater is at 192.168.0.50
- Upload factory.bin, confirm flashing
  (seems to work best with Chromium-based browsers)

Revert to OEM firmware:
- tar -xvf DAP-X1860_RevA_Firmware_101b94.bin
- openssl enc -d -md md5 -aes-256-cbc -in FWImage.st2 \
  -out FWImage.st1 -k MB0dBx62oXJXDvt12lETWQ==
- tar -xvf FWImage.st1
- flash kernel_DAP-X1860.bin via Recovery

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
22 months agokernel: backport of changes & helpers
Rafał Miłecki [Sat, 7 Jan 2023 15:59:14 +0000 (16:59 +0100)]
kernel: backport of changes & helpers

This code is required for upcoming NVMEM changes.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
22 months agobusybox: update to 1.36.0
Hannu Nyman [Tue, 3 Jan 2023 21:48:51 +0000 (23:48 +0200)]
busybox: update to 1.36.0

Update busybox to version 1.36.0

* refresh patches (remove the backported upstream fix)
* refresh config

Config refresh:

Refresh commands, run after busybox is first built once:

cd package/utils/busybox/config/
../convert_menuconfig.pl ../../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.36.0
cd ..
./convert_defaults.pl ../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.36.0/.config > Config-defaults.in

Manual edits needed after config refresh:

* Config-defaults.in: OpenWrt config symbol IPV6 logic applied to
  BUSYBOX_DEFAULT_FEATURE_IPV6

* Config-defaults.in: OpenWrt config TARGET_bcm53xx logic applied to
  BUSYBOX_DEFAULT_TRUNCATE (commit 547f1ec)

* Config-defaults.in: OpenWrt logic applied to
  BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD (commit dc92917)

* Config-defaults.in: correct the default ports that get reset
  BUSYBOX_DEFAULT_FEATURE_HTTPD_PORT_DEFAULT    80
  BUSYBOX_DEFAULT_FEATURE_TELNETD_PORT_DEFAULT  23

* config/editors/Config.in: Add USE_GLIBC dependency to
  BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH (commit f141090)

* config/shell/Config.in: change at "Options common to all shells" the conditional symbol
  SHELL_ASH --> BUSYBOX_CONFIG_SHELL_ASH
  (discussion in http://lists.openwrt.org/pipermail/openwrt-devel/2021-January/033140.html
  Apparently our script does not see the hidden option while
  prepending config options with "BUSYBOX_CONFIG_" which leads to a
  missed dependency when the options are later evaluated.)

* Edit a few Config.in files by adding quotes to sourced items in
  config/Config.in, config/networking/Config.in and config/util-linux/Config.in (commit 1da014f)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
22 months agoutil-linux: update to 2.38.1
Linhui Liu [Sat, 7 Jan 2023 03:28:00 +0000 (11:28 +0800)]
util-linux: update to 2.38.1

Release Notes:
    https://cdn.kernel.org/pub/linux/utils/util-linux/v2.38/v2.38.1-ReleaseNotes

Remove upstreamed:
- 010-meson-typo.patch
- 020-meson-fix-compilation-without-systemd.patch
- 110-meson-fix-when-HAVE_CLOCK_GETTIME-is-set.patch

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
22 months agotools/mpfr: update to 4.2.0
Linhui Liu [Sat, 7 Jan 2023 01:55:28 +0000 (09:55 +0800)]
tools/mpfr: update to 4.2.0

Changes from versions 4.1.* to version 4.2.0:
- The "fondue savoyarde" release.
- Binary compatible with MPFR 4.0.* and 4.1.*, though some minor changes in
  the behavior of the formatted output functions may be visible, regarded
  as underspecified behavior or bug fixes (see below).
- New functions mpfr_cosu, mpfr_sinu, mpfr_tanu, mpfr_acosu, mpfr_asinu,
  mpfr_atanu and mpfr_atan2u.
- New functions mpfr_cospi, mpfr_sinpi, mpfr_tanpi, mpfr_acospi, mpfr_asinpi,
  mpfr_atanpi and mpfr_atan2pi.
- New functions mpfr_log2p1, mpfr_log10p1, mpfr_exp2m1, mpfr_exp10m1 and
  mpfr_compound_si.
- New functions mpfr_fmod_ui, mpfr_powr, mpfr_pown, mpfr_pow_uj, mpfr_pow_sj
  and mpfr_rootn_si (mpfr_pown is actually a macro defined as an alias for
  mpfr_pow_sj).
- Bug fixes.
  In particular, for the formatted output functions (mpfr_printf, etc.),
  the case where the precision consists only of a period has been fixed
  to be like ".0" as specified in the ISO C standard, and the manual has
  been corrected and clarified.
  The macros of the custom interface have also been fixed: they now behave
  like functions (except a minor limitation for mpfr_custom_init_set).

Remove upstreamed:
- 002-Fix-mpfr_custom_get_kind-macro-bug.patch

Refresh patches:
- 001-only_src.patch

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
22 months agotools/xz: update to 5.4.0
Linhui Liu [Sat, 7 Jan 2023 09:06:21 +0000 (17:06 +0800)]
tools/xz: update to 5.4.0

Release notes:
    https://git.tukaani.org/?p=xz.git;a=blob;f=NEWS;hb=HEAD

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
22 months agomt76: add stand-alone MT7622 firmware package
Shiji Yang [Sat, 17 Dec 2022 12:50:55 +0000 (12:50 +0000)]
mt76: add stand-alone MT7622 firmware package

Add a separate firmware package to avoid installing the MT7615 firmware
on all MT7622 target devices by default. Now we only add MT7615 firmware
packages for devices that use MT7615E. This commit also removes the
explicit dependency on kmod-mt7615e to refine the package dependency.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
22 months agomt76: add stand-alone MT7915 firmware package
Shiji Yang [Sat, 17 Dec 2022 12:50:52 +0000 (12:50 +0000)]
mt76: add stand-alone MT7915 firmware package

The mt7915e driver supports MT7915, MT7916 and MT7986 chips. And Only
MT7915 series chips need the MT7915 firmware. To save storage, extract
them from the common code package and create a new package to provide
the firmware.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
22 months agomt76: remove unnecessary dependency from mt7915e
Shiji Yang [Sat, 17 Dec 2022 12:50:42 +0000 (12:50 +0000)]
mt76: remove unnecessary dependency from mt7915e

The kmod-mt7615-common package does not contain any code that
related to mt7915e Wi-Fi6 driver, so remove it.

Tested on ramips/mt7621: SIM SIMAX1800T

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
22 months agoramips: use default lzma dictionary size for better performance
Shiji Yang [Thu, 1 Dec 2022 10:49:45 +0000 (18:49 +0800)]
ramips: use default lzma dictionary size for better performance

limit dictionary size patch was introduced to solve the well known
"LZMA ERROR 1 - must RESET board to recover" error.
09b6755946409d8fd8 "ramips: limit dictionary size for lzma compression"

It seems that it has failed recently and we can use lzma loader to fix
this error by adding "$(Device/uimage-lzma-loader)". So just remove it
to use the default parameter -d24 for a higher compression ratio.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
22 months agokernel: Refresh kernel patches
Hauke Mehrtens [Sat, 7 Jan 2023 13:51:55 +0000 (14:51 +0100)]
kernel: Refresh kernel patches

Make the patches apply cleanly again.

Fixes: 8dfe69cdfc5c ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agokernel: fix bugs added with mac-address-ascii support
Rafał Miłecki [Thu, 5 Jan 2023 12:33:18 +0000 (13:33 +0100)]
kernel: fix bugs added with mac-address-ascii support

1. Check for -EPROBE_DEFER
If it occurs we have to return immediately. Trying other properties
could result in another error and ignoring -EPROBE_DEFER which has a
special meaning.

2. Check for read result
Assuming property->read() success can result in NULL pointer
dereference. It happens e.g. for "mac-address" with NVMEM cell
containing invalid MAC.

3. Simplify code
Don't move cell reading & nvmem_cell_put() into a loop. Simplify loop
code.

Fixes: ecd81de7a5ab ("ath79: add nvmem cell mac-address-ascii support")
Cc: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
22 months agorealtek: don't relocate kernel on HPE 1920 series
Jan Hoffmann [Thu, 5 Jan 2023 21:36:24 +0000 (22:36 +0100)]
realtek: don't relocate kernel on HPE 1920 series

This is no longer needed now that the kernel is built with a load
address that matches the one hard-coded in the bootloader.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
22 months agoscripts: add Apache fastly mirror
David Bauer [Sat, 7 Jan 2023 00:22:23 +0000 (01:22 +0100)]
scripts: add Apache fastly mirror

Add the Apache fastly mirror as preferred download source.
This service is using a dual-stacked CDN.

Signed-off-by: David Bauer <mail@david-bauer.net>
22 months agozyxel-bootconfig: clean up script
David Bauer [Mon, 26 Dec 2022 21:33:47 +0000 (22:33 +0100)]
zyxel-bootconfig: clean up script

Drop unused variable and fix identation.

Signed-off-by: David Bauer <mail@david-bauer.net>
22 months agoath79: combine UniFi AC dual firmware-partitions
David Bauer [Thu, 17 Nov 2022 21:53:33 +0000 (22:53 +0100)]
ath79: combine UniFi AC dual firmware-partitions

In order to maximize the available space on UniFi AC boards using a
dual-image partition layout, combine the two OS partitions into a single
partition.

This allows users to access more usable space for additional packages.

Don't limit the usable image size to the size of a single OS partition.
The initial installation has to be done with an older version of OpenWrt
in case the generated image exceeds the space of a single kernel
partition in the future.

Signed-off-by: David Bauer <mail@david-bauer.net>
22 months agoramips: combine USW-Flex dual firmware-partitions
David Bauer [Thu, 17 Nov 2022 22:02:13 +0000 (23:02 +0100)]
ramips: combine USW-Flex dual firmware-partitions

In order to maximize the available space on USW-Flex boards using a
dual-image partition layout, combine the two OS partitions into a single
partition.

This allows users to access more usable space for additional packages.

Don't limit the usable image size to the size of a single OS partition.
The initial installation has to be done with an older version of OpenWrt
in case the generated image exceeds the space of a single kernel
partition in the future.

Signed-off-by: David Bauer <mail@david-bauer.net>
22 months agoath79: combine OCEDO dual firmware-partitions
David Bauer [Tue, 15 Nov 2022 14:25:40 +0000 (15:25 +0100)]
ath79: combine OCEDO dual firmware-partitions

In order to maximize the available space on OCEDO boards using a
dual-image partition layout, combine the two OS partitions into a single
partition.

This allows users to access more usable space for additional packages.

Don't limit the usable image size to the size of a single OS partition.
The initial installation has to be done with an older version of OpenWrt
in case the generated image exceeds the space of a single OS
partition in the future.

Signed-off-by: David Bauer <mail@david-bauer.net>
22 months agotreewide: update NVMEM symbols
Rafał Miłecki [Sat, 7 Jan 2023 00:28:19 +0000 (01:28 +0100)]
treewide: update NVMEM symbols

Fixes: 8dfe69cdfc5c ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
22 months agokernel: update nvmem subsystem to the latest upstream
Rafał Miłecki [Fri, 6 Jan 2023 18:37:37 +0000 (19:37 +0100)]
kernel: update nvmem subsystem to the latest upstream

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
22 months agomvebu: harmonize GL.iNet GL-MV1000 MTD partitions layout with vendor
Enrico Mioso [Sun, 20 Nov 2022 04:19:06 +0000 (05:19 +0100)]
mvebu: harmonize GL.iNet GL-MV1000 MTD partitions layout with vendor

The GL-MV1000 ships with a 16MB spi-nor flash, containing a copy of the stock GL.iNet firmware.
Add the corresponding flash areas, so our view matches the one of the in-flash stock firmware.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
22 months agoocteontx: add sqaushfs and ramdisk to features
Tim Harvey [Wed, 28 Dec 2022 21:38:15 +0000 (13:38 -0800)]
octeontx: add sqaushfs and ramdisk to features

Add squashfs and ramdisk to features as these are commonly used images
for the octeontx.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
22 months agoramips: add support for Cudy M1800
Leon M. Busch-George [Sat, 12 Nov 2022 18:31:41 +0000 (19:31 +0100)]
ramips: add support for Cudy M1800

Specifications

  SoC:       MT7621
  CPU:       880 MHz
  Flash:     32 MiB
  RAM:       256 MiB
  WLAN:      MT7915 WiFi 6 (2.4/5 GHz)
  Ethernet:  2x Gbit ports

                  MAC
LAN        b4:4b:d6:2e:c7:b0 (label)
WAN        b4:4b:d6:2e:c7:b1
WiFi 2.4   00:0c:43:26:46:08
WiFi 5     00:0c:43:26:59:97

Installation

There are two known options:
1) The Luci-based UI.
2) Press and hold the reset button during power up.
   The router will request 'recovery.bin' from a TFTP server at
   192.168.1.88.

Both options require a signed firmware binary.
The openwrt image supplied by cudy is signed and can be used to
install unsigned images.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
22 months agokernel: add patch to support en25qh256a
Leon M. Busch-George [Sat, 12 Nov 2022 18:31:32 +0000 (19:31 +0100)]
kernel: add patch to support en25qh256a

The EN25QH256A variant of the EN25QH256 doesn't initialize correctly from SFDP
alone and only accesses memory below 8m (addr_width is 4 but read_opcode takes
only 3 bytes).

Set SNOR_F_4B_OPCODES if the flash chip variant was detected using hwcaps.

The fix submitted upstream uses the PARSE_SFDP initializer that is not
available in the kernel used with Openwrt.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
22 months agoath79: tiny: Do not build TPLink WPA8630Pv2 by default
Joe Mullally [Mon, 28 Nov 2022 20:35:39 +0000 (20:35 +0000)]
ath79: tiny: Do not build TPLink WPA8630Pv2 by default

22.03.1+ and snapshot builds no longer fit the 6M flash space
available for these models.

This disables failing buildbot image builds for these devices.
Images can still be built manually with ImageBuilder.

Signed-off-by: Joe Mullally <jwmullally@gmail.com>
22 months agotarget/imagebuilder: add help text and rename whatdepends to package_whatdepens
Florian Eckert [Thu, 19 Aug 2021 06:48:08 +0000 (08:48 +0200)]
target/imagebuilder: add help text and rename whatdepends to package_whatdepens

Add the command `package_whatdepends` to show all package that have a
dependency to this packages.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
22 months agotarget/imagebuilder: update help text for manifest target
Florian Eckert [Thu, 19 Aug 2021 06:42:50 +0000 (08:42 +0200)]
target/imagebuilder: update help text for manifest target

- Add a help text for the manifest command.
- Unify command detail help text to use `manifest`.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
22 months agotarget/imagebuilder: change help text for image build
Florian Eckert [Thu, 19 Aug 2021 06:39:42 +0000 (08:39 +0200)]
target/imagebuilder: change help text for image build

Using command `image` to unify help text.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
22 months agotarget/imagebuilder: add depends target to show all package that gets installed
Florian Eckert [Wed, 18 Aug 2021 15:19:15 +0000 (17:19 +0200)]
target/imagebuilder: add depends target to show all package that gets installed

This commits adds the makefile targets `depends` this wrapper is a call
to `opkg depends`. This command shows which runtime dependencies exist
if this package is installed into the image.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
22 months agoath79: convert UBNT Aircube AC WiFis to nvmem-cells
Stefan Kalscheuer [Sun, 18 Dec 2022 11:32:42 +0000 (12:32 +0100)]
ath79: convert UBNT Aircube AC WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Merge art into partition node.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
22 months agotools/llvm: update to 15.0.6
Linhui Liu [Fri, 16 Dec 2022 01:41:53 +0000 (09:41 +0800)]
tools/llvm: update to 15.0.6

Release Notes:
https://discourse.llvm.org/t/llvm-15-0-0-release/65099
https://discourse.llvm.org/t/llvm-15-0-1-released/65380
https://discourse.llvm.org/t/llvm-15-0-2-released/65695
https://discourse.llvm.org/t/llvm-15-0-3-released/66036
https://discourse.llvm.org/t/llvm-15-0-4-released/66337
https://discourse.llvm.org/t/llvm-15-0-5-release/66616
https://discourse.llvm.org/t/llvm-15-0-6-released/66899

Remove HOST_BUILD_PARALLEL as it's default now.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
22 months agoramips: add support for Keenetic KN-1613
Maxim Anisimov [Fri, 30 Dec 2022 12:30:52 +0000 (15:30 +0300)]
ramips: add support for Keenetic KN-1613

Keenetic KN-1613 is a 2.4/5 Ghz band 11ac (Wi-Fi 5) router, based on MT7628AN.

Specification:
- System-On-Chip: MT7628AN
- CPU/Speed: 580 MHz
- Flash-Chip: Winbond w25q256
- Flash size: 32768 KiB
- RAM: 128 MiB
- 4x 10/100 Mbps Ethernet
- 2x external, non-detachable antennas
- UART (J1) header on PCB (115200 8n1)
- Wireless No1 (2T2R): SoC Built-in 2.4 GHz 802.11bgn
- Wireless No2 (2T2R): MT7613BE 5 GHz 802.11ac
- 4x LED, 2x button, 1x mode switch

Notes:
- The device supports dual boot mode
- The firmware partitions were concatinated into one
- The FN button led indicator has been reassigned as the 2.4GHz
  wifi indicator.

Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-ramips-mt76x8-keenetic_kn-1613-squashfs-factory.bin"
   to "KN-1613_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed until power led start blinking.
4. Router will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
22 months agoramips: enable mtd virtual concat support for mt76x8 subtarget
Maxim Anisimov [Fri, 30 Dec 2022 12:29:30 +0000 (15:29 +0300)]
ramips: enable mtd virtual concat support for mt76x8 subtarget

This is required for upcoming Keenetic KN-1613 support

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
22 months agotcpdump: update to 4.99.2
Nick Hainke [Thu, 5 Jan 2023 14:45:38 +0000 (15:45 +0100)]
tcpdump: update to 4.99.2

Update to latest version. For release information look into CHANGES
file [0].

Automatically refreshed:
- 001-remove_pcap_debug.patch

Manually refreshed:
- 100-tcpdump_mini.patch

old ipkg sizes:
316554 bin/packages/mips_24kc/base/tcpdump_4.99.1-1_mips_24kc.ipk
141457 bin/packages/mips_24kc/base/tcpdump-mini_4.99.1-1_mips_24kc.ipk

new ipkg sizes:
318089 bin/packages/mips_24kc/base/tcpdump_4.99.2-1_mips_24kc.ipk
141941 bin/packages/mips_24kc/base/tcpdump-mini_4.99.2-1_mips_24kc.ipk

[0] - https://github.com/the-tcpdump-group/tcpdump/blob/master/CHANGES

Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agolibpcap: update to 1.20.2
Nick Hainke [Thu, 5 Jan 2023 10:08:27 +0000 (11:08 +0100)]
libpcap: update to 1.20.2

A huge rewrite in libpcap was introduced by dc14a7babca1 ("rpcap: have
the server tell the client its byte order.") [0]. The patch
"201-space_optimization.patch" does not apply at all anymore. So remove
it.

Refresh:
- 100-no-openssl.patch
- 102-skip-manpages.patch

Update the "300-Add-support-for-B.A.T.M.A.N.-Advanced.patch" with latest
PR [1].

old ipkg size:
90964 bin/packages/mips_24kc/base/libpcap1_1.10.1-5_mips_24kc.ipk

new ipkg size:
93340 bin/packages/mips_24kc/base/libpcap1_1.10.2-1_mips_24kc.ipk

[0] - https://github.com/the-tcpdump-group/libpcap/commit/dc14a7babca1471809bee6872539ff836937840e
[1] - https://github.com/the-tcpdump-group/libpcap/pull/980

Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agonftables: update to 1.0.6
Nick Hainke [Thu, 22 Dec 2022 18:59:37 +0000 (19:59 +0100)]
nftables: update to 1.0.6

Remove upstreamed patches:
- 0001-fix-nft.patch

Upstream switched to "tar.xz" archives.

old ipkg size:
273678 bin/packages/mips_24kc/base/nftables-json_1.0.5-2_mips_24kc.ipk

new ipkg size:
271624 bin/packages/mips_24kc/base/nftables-json_1.0.6-1_mips_24kc.ipk

Release Information:
https://netfilter.org/projects/nftables/files/changes-nftables-1.0.6.txt

Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agogeneric: fix silicon labs spidev bindings
Vincent Tremblay [Sun, 1 Jan 2023 19:16:08 +0000 (14:16 -0500)]
generic: fix silicon labs spidev bindings

Fix Silicon Labs bindings in the spidev driver

Some bindings for Silicon Labs chips already exists upstream.
These bindings can be found in trivial-devices.yaml.

The existing bindings are using "silabs" instead of "siliconlabs" to
identify the manufacturer.

This commit add two submitted patches for silabs chips and rename the
manufacturer in the different DTS for more coherence.

Signed-off-by: Vincent Tremblay <vincent@vtremblay.dev>
22 months agoath79: add support for Fortinet FAP-221-B
Michael Pratt [Mon, 12 Dec 2022 09:55:34 +0000 (04:55 -0500)]
ath79: add support for Fortinet FAP-221-B

FCC ID: U2M-CAP4100AG

Fortinet FAP-221-B is an indoor access point with
1 Gb ethernet port, dual-band wireless,
internal antenna plates, and 802.3at PoE+

Hardware and board design from Senao

**Specification:**

 - AR9344 SOC 2G 2x2, 5G 2x2, 25 MHz CLK
 - AR9382 WLAN 2G 2x2 PCIe, 40 MHz CLK
 - AR8035-A PHY RGMII, PoE+ IN, 25 MHz CLK
 - 16 MB FLASH MX25L12845EMI-10G
 - 2x 32 MB RAM W9725G6JB-25
 - UART at J11 populated, 9600 baud
 - 6 LEDs, 1 button power, ethernet, wlan, reset

  Note: ethernet LEDs are not enabled
because a new netifd hotplug is required
in order to operate like OEM.
Board has 1 amber and 1 green
for each of the 3 case viewports.

**MAC addresses:**

1 MAC Address in flash at end of uboot
ASCII encoded, no delimiters
Labeled as "MAC Address" on case
OEM firmware sets offsets 1 and 8 for wlan

  eth0 *:1e uboot 0x3ff80
  phy0 *:1f uboot 0x3ff80 +1
  phy1 *:26 uboot 0x3ff80 +8

**Serial Access:**

Pinout: (arrow) VCC GND RX TX

Pins are populated with a header and traces not blocked.
Bootloader is set to 9600 baud, 8 data, 1 stop.

**Console Access:**

Bootloader:

Interrupt boot with Ctrl+C
Press "k" and enter password "1"
OR
Hold reset button for 5 sec during power on
Interrupt the TFTP transfer with Ctrl+C

to print commands available, enter "help"

OEM:

default username is "admin", password blank
telnet is available at default address 192.168.1.2
serial is available with baud 9600

to print commands available, enter "help"
or tab-tab (busybox list of commands)

**Installation:**

Use factory.bin with OEM upgrade procedures
OR
Use initramfs.bin with uboot TFTP commands.
Then perform a sysupgrade with sysupgrade.bin

**TFTP Recovery:**

Using serial console, load initramfs.bin using TFTP
to boot openwrt without touching the flash.
TFTP is not reliable due to bugged bootloader,
set MTU to 600 and try many times.
If your TFTP server supports setting block size,
higher block size is better.
Splitting the file into 1 MB parts may be necessary

example:

$ tftpboot 0x80100000 image1.bin
$ tftpboot 0x80200000 image2.bin
$ tftpboot 0x80300000 image3.bin
$ tftpboot 0x80400000 image4.bin
$ tftpboot 0x80500000 image5.bin
$ tftpboot 0x80600000 image6.bin
$ bootm 0x80100000

**Return to OEM:**

The best way to return to OEM firmware
is to have a copy of the MTD partitions
before flashing Openwrt.

Backup copies should be made of partitions
"fwconcat0", "loader", and "fwconcat1"
which together is the same flash range
as OEM's "rootfs" and "uimage"
by loading an initramfs.bin
and using LuCI to download the mtdblocks.

It is also possible to extract from the
OEM firmware upgrade image by splitting it up
in parts of lengths that correspond
to the partitions in openwrt
and write them to flash,
after gzip decompression.

After writing to the firmware partitions,
erase the "reserved" partition and reboot.

**OEM firmware image format:**

Images from Fortinet for this device
ending with the suffix .out
are actually a .gz file

The gzip metadata stores the original filename
before compression, which is a special string
used to verify the image during OEM upgrade.

After gzip decompression, the resulting file
is an exact copy of the MTD partitions
"rootfs" and "uimage" combined in the same order and size
that they appear in /proc/mtd and as they are on flash.

OEM upgrade is performed by a customized busybox
with the command "upgrade".
Another binary, "restore"
is a wrapper for busybox's "tftp" and "upgrade".

Signed-off-by: Michael Pratt <mcpratt@pm.me>
22 months agoimage: add gzip-filename build recipe
Michael Pratt [Thu, 22 Dec 2022 02:33:04 +0000 (21:33 -0500)]
image: add gzip-filename build recipe

Some vendors use basic gzip metadata (original filename and timestamp)
to verify valid images, along with the size of it's contents.

Also, add a new device profile variable FACTORY_IMG_NAME
which would be ideal to use with this new recipe.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
22 months agobase-files: rework mtd_get_mac_text()
Michael Pratt [Sat, 10 Dec 2022 11:34:54 +0000 (06:34 -0500)]
base-files: rework mtd_get_mac_text()

It's necessary to be able to specify the length
for MAC addresses that are stored in flash, for example,
in a case where it is stored without any delimiter.

Let both offset and length have default values.

Add a sanity check related to partition size.

Also, clean up syntax and unnecessary lines.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
22 months agoath79: allow skipping hash for Senao sysupgrade
Michael Pratt [Fri, 9 Dec 2022 22:47:11 +0000 (17:47 -0500)]
ath79: allow skipping hash for Senao sysupgrade

Some vendors of Senao boards have a similar flash layout
situation that causes the need to split the firmware partition
and use the lzma-loader, but do not store
checksums of the partitions or otherwise
do not even have a uboot environment partition.

This adds simple shell logic to skip that part.

Also, simplify some lines and variable usage.

Signed-off-by: Michael Pratt <mcpratt@pm.me>