openwrt/staging/blocktrron.git
22 months agokernel: remove hack patch, move kirkwood specific kmods to target modules.mk
Felix Fietkau [Fri, 30 Sep 2022 09:42:06 +0000 (11:42 +0200)]
kernel: remove hack patch, move kirkwood specific kmods to target modules.mk

Tweaking the KCONFIG line of kmod-ata-marvell-sata makes the hack patch
unnecessary

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2e375e9b3148cfdb9b19494a25eebc2fa7b256a3)

22 months agokernel: bump 5.10 to 5.10.161
John Audia [Wed, 21 Dec 2022 19:19:12 +0000 (14:19 -0500)]
kernel: bump 5.10 to 5.10.161

All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

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

22 months agouhttpd: update to latest Git HEAD
Hauke Mehrtens [Mon, 26 Dec 2022 12:58:47 +0000 (13:58 +0100)]
uhttpd: update to latest Git HEAD

2397755 client: fix incorrectly emitting HTTP 413 for certain content lengths

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

22 months agokernel: backport ksmbd security fix ZDI-22-1690
Daniel Graña [Fri, 23 Dec 2022 18:24:34 +0000 (15:24 -0300)]
kernel: backport ksmbd security fix ZDI-22-1690

Fix zero day vulnerability reported as ZDI-22-1690, no CVE assigned yet.
Picked from https://github.com/cifsd-team/ksmbd/commit/1f9d85a340

Signed-off-by: Daniel Graña <dangra@gmail.com>
22 months agoRevert "image-commands.mk: Be consistent in command invocation"
Hauke Mehrtens [Thu, 22 Dec 2022 12:02:07 +0000 (13:02 +0100)]
Revert "image-commands.mk: Be consistent in command invocation"

This reverts commit fcff234fd89e8b24aa3ad2f352ddbb5304c38dc1.

$(STAGING_DIR_HOST)/bin/gzip is not available in openwrt-22.03. The
change broke the build because the build process could not find this
file. For example ath79/generic netgear_wndap360 was affected.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agosunxi: remove frequency for NanoPi R1
Jan-Niklas Burfeind [Sun, 11 Dec 2022 13:04:46 +0000 (14:04 +0100)]
sunxi: remove frequency for NanoPi R1

The frequency appears as unlisted initial frequency.
Removed it as Hauke suggested.

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
(cherry picked from commit 5b82eeb320d9f8e543232bb5dd004e644b35983e)

22 months agoarm-trusted-firmware-sunxi: drop CPE ID
Stijn Tintel [Tue, 20 Dec 2022 18:04:54 +0000 (20:04 +0200)]
arm-trusted-firmware-sunxi: drop CPE ID

The CPE ID is already set in trusted-firmware-a.mk.

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

22 months agotrusted-firmware-a.mk: use correct CPE ID
Stijn Tintel [Tue, 20 Dec 2022 18:04:53 +0000 (20:04 +0200)]
trusted-firmware-a.mk: use correct CPE ID

There are 2 different CPE IDs on the NVD website:
cpe:/a:arm:trusted_firmware-a
cpe:/o:arm:arm_trusted_firmware

The ID as currently used in trusted-firmware-a.mk does not exist. The
CPE ID using the arm_trusted_firmware product name only lists a few
records for versions 2.2 and 2.3 on the NVD site. The CPE ID using the
trusted_firmware-a product name lists many more records, and actually
has a CVE linked to it. Therefore, use the CPE ID using the
trusted_firmware-a product name.

Fixes: 104d60fe94ce ("trusted-firmware-a.mk: add PKG_CPE_ID")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit c8c6508c22c59a09b7acce63bed28947788a46d4)

22 months agokernel: bump 5.10 to 5.10.160
John Audia [Mon, 19 Dec 2022 14:18:02 +0000 (09:18 -0500)]
kernel: bump 5.10 to 5.10.160

No patches affected by this update.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

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

22 months agoath79: image: don't depend on other COMPILE targets
Alexander Couzens [Sat, 3 Dec 2022 14:25:12 +0000 (15:25 +0100)]
ath79: image: don't depend on other COMPILE targets

A device COMPILE target should not depend on another COMPILE.
Otherwise race condition may happen.
The loader is very small. Compiling it twice shouldn't
have a huge impact.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
(cherry picked from commit 17c6fb1054e3dde8fa573195acaac42a5edf0942)

22 months agoimage: fix device profile specific COMPILE targets
Michael Pratt [Tue, 22 Nov 2022 00:37:39 +0000 (00:37 +0000)]
image: fix device profile specific COMPILE targets

Commit a01d23e75 ("image: always rebuild kernel loaders")
is a step in the right direction, but exposed some issues
and regressions in the makefile.

Some of the files made by device specific COMPILE targets
start with an "append" command (i.e. >> instead of > redirection)
and if the file already exists, the target file is the
input to itself before the first recipe-specified input.

Fixes: a01d23e75 ("image: always rebuild kernel loaders")
Fixes: a7fb589e8 ("image: always rebuild kernel loaders")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
(cherry picked from commit 1bff0752bd5e7feb0f311224a09b3bf217a9aeb3)

22 months agorules: fix broken commitcount on alpine system
Christian Marangi [Sat, 17 Dec 2022 15:39:00 +0000 (16:39 +0100)]
rules: fix broken commitcount on alpine system

To generate commitcount we use grep --max-count. This is not present on
alpine grep and cause wrong generation. Use -m as it's just the short
version of --max-count and more portable.

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

22 months agoimage-commands.mk: Be consistent in command invocation
Olliver Schinagl [Wed, 14 Dec 2022 10:39:17 +0000 (11:39 +0100)]
image-commands.mk: Be consistent in command invocation

Most/all other tools use the staging dir prefix, gzip should as well.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 47df168dd279d52127f6bbc623e79bdeeb6c8fd4)

22 months agosunxi: fix typo in device packages for MarsBoard A10
Chukun Pan [Sun, 9 Oct 2022 15:15:28 +0000 (23:15 +0800)]
sunxi: fix typo in device packages for MarsBoard A10

The kmod prefix for sound-soc-sunxi is missing, fix it.
Also add kmod-sound-core as dependence.

Fixes: 6a35659 ("sunxi: Added profile for HAOYU Electronics Marsboard A10")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(cherry picked from commit 7bcf6b54fc819c26fc2cea32c464e87614cc2d26)

22 months agokernel: Make KERNEL_MAKEOPTS recursively expanded
Hauke Mehrtens [Wed, 14 Dec 2022 15:29:16 +0000 (16:29 +0100)]
kernel: Make KERNEL_MAKEOPTS recursively expanded

KERNEL_MAKEOPTS will get expanded when it is used and not when it is
defined in the kernel.mk file now. This fixes problems finding dependent
kernel modules when it is used by a kernel module package.

Without this change the build of packages which depend on other out of
tree modules failed when they used KERNEL_MAKE because some symbols could
not be found. This happened because KERNEL_MAKE_FLAGS which contains a
"if $(__package_mk)" was  evaluated where KERNEL_MAKEOPTS was defined
and not when the KERNEL_MAKE was used. For packages which included
kernel.mk before package.mk we saw this problem. One workaround
was to use the correct include order and the other one was to not
use KERNEL_MAKE_FLAGS, but copy its content.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
(cherry picked from commit 06ad3adeecc27859313e60c173c435d45ac2b345)

22 months agolantiq: vr9: include usb driver for fritz 7430
Tony Butler [Fri, 9 Dec 2022 11:13:16 +0000 (03:13 -0800)]
lantiq: vr9: include usb driver for fritz 7430

Reported by user: missing driver for USB; add to image definition
https://github.com/openwrt/openwrt/issues/11326

Resolves: #11326

Signed-off-by: Tony Butler <spudz76@gmail.com>
Acked-by: Aleksander Jan Bajkowski <olek2@wp.pl>
(cherry picked from commit 9a1ab8aa0398f93360bf54d81bcd332cd413c03f)

22 months agowolfssl: fix build with /dev/crypto
Chukun Pan [Thu, 1 Dec 2022 15:28:38 +0000 (23:28 +0800)]
wolfssl: fix build with /dev/crypto

Backport upstream patch to fix build error when
/dev/crypto enabled.

https://github.com/wolfSSL/wolfssl/commit/dc9f46a3be00b5e82684a158605189d1278e324c

Fixes: #10944
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(cherry picked from commit 171691500eca0737c59d4fff50578b74a90583be)

22 months agotoolchain: Update glibc 2.34 to recent HEAD
Hauke Mehrtens [Wed, 21 Dec 2022 13:25:46 +0000 (14:25 +0100)]
toolchain: Update glibc 2.34 to recent HEAD

This adds the following changes:
a88f07f71f stdlib: Remove attr_write from mbstows if dst is NULL [BZ: 29265]
4bc889c01c stdlib: Fixup mbstowcs NULL __dst handling. [BZ #29279]
1fcc7bfee2 alpha: Fix generic brk system call emulation in __brk_call (bug 29490)
68507377f2 socket: Check lengths before advancing pointer in CMSG_NXTHDR
536ddc5c02 elf: Call __libc_early_init for reused namespaces (bug 29528)
2a44960cbc Apply asm redirections in stdio.h before first use [BZ #27087]
b41c535f46 Apply asm redirections in wchar.h before first use
2b3d020055 nscd: Fix netlink cache invalidation if epoll is used [BZ #29415]
bc5cb538e5 elf: Run tst-audit-tlsdesc, tst-audit-tlsdesc-dlopen everywhere
2ff6775ad3 elf: Fix hwcaps string size overestimation
f50a6c843a gconv: Use 64-bit interfaces in gconv_parseconfdir (bug 29583)
1a3afdfe31 resolv: Add tst-resolv-byaddr for testing reverse lookup
6a833d798e resolv: Add tst-resolv-aliases
4d2e67d6e5 resolv: Add internal __res_binary_hnok function
bb8adbba4f resolv: Add the __ns_samebinaryname function
c288e032ae resolv: Add internal __ns_name_length_uncompressed function
e7c03f4765 resolv: Add DNS packet parsing helpers geared towards wire format
d9c979abf9 nss_dns: Split getanswer_ptr from getanswer_r
32e5db3768 nss_dns: Rewrite _nss_dns_gethostbyaddr2_r and getanswer_ptr
7267341ec1 nss_dns: Remove remnants of IPv6 address mapping
9abc40d9b5 nss_dns: Rewrite getanswer_r to match getanswer_ptr (bug 12154, bug 29305)
c36e7cca35 nss_dns: In gaih_getanswer_slice, skip strange aliases (bug 12154)
480c820493 resolv: Add new tst-resolv-invalid-cname
2def56a349 nss_dns: Rewrite _nss_dns_gethostbyname4_r using current interfaces
044755e2fa resolv: Fix building tst-resolv-invalid-cname for earlier C standards
a2e259014f Avoid extra load with CAS in __pthread_mutex_lock_full [BZ #28537]
ed8300c054 Avoid extra load with CAS in __pthread_mutex_clocklock_common [BZ #28537]
a6b81f605d Add LLL_MUTEX_READ_LOCK [BZ #28537]
6bcfbee727 Move assignment out of the CAS condition
43760d33d7 nptl: Effectively skip CAS in spinlock loop
04efdcfac4 sysdeps: Add 'get_fast_jitter' interace in fast-jitter.h
ea69248445 nptl: Add backoff mechanism to spinlock loop
95f5089d4a x86: include BMI1 and BMI2 in x86-64-v3 level
414fc856ff x86-64: Require BMI2 for AVX2 str(n)casecmp implementations
e1561d8cf0 x86-64: Require BMI2 for AVX2 strcmp implementation
b9cbb8dd48 x86-64: Require BMI2 for AVX2 strncmp implementation
67e863742d x86-64: Require BMI2 for AVX2 wcs(n)cmp implementations
94b9c1b640 x86-64: Require BMI2 for AVX2 (raw|w)memchr implementations
36d6b9be3d x86-64: Require BMI2 and LZCNT for AVX2 memrchr implementation
e570b865b5 x86-64: Require BMI1/BMI2 for AVX2 strrchr and wcsrchr implementations
e3976287b2 nscd: Drop local address tuple variable [BZ #29607]
c95ef423d7 nss: Implement --no-addrconfig option for getent
16c7ed6e68 nss: Fix tst-nss-files-hosts-long on single-stack hosts (bug 24816)
d5313bcb7e nss: Use shared prefix in IPv4 address in tst-reload1
9f55d2e7c4 elf: Do not completely clear reused namespace in dlmopen (bug 29600)
ca5df79545 linux: Fix generic struct_stat for 64 bit time (BZ# 29657)
f42d871b22 Makerules: fix MAKEFLAGS assignment for upcoming make-4.4 [BZ# 29564]
675ba1f361 mktime: improve heuristic for ca-1986 Indiana DST
6e8044e910 Fix memmove call in vfprintf-internal.c:group_number
291d440206 Allow #pragma GCC in headers in conformtest
86a701a204 regex: copy back from Gnulib
fa5044f1e3 regex: fix buffer read overrun in search [BZ#28470]
06afa5e09f io: Fix ftw internal realloc buffer (BZ #28126)
deea6ab1bc io: Fix use-after-free in ftw [BZ #26779]
d57cdc1b5a Linux: Support __IPC_64 in sysvctl *ctl command arguments (bug 29771)
75b0edb7ef Update NEWS file in the right place
691f70b84a elf: Fix rtld-audit trampoline for aarch64
e3255e7d21 x86: Fix wcsnlen-avx2 page cross length comparison [BZ #29591]
309c4708ac elf: Fix wrong fscanf usage on tst-pldd
42b9d7def8 Allow for unpriviledged nested containers
405b8ae135 elf: Fix wrong fscanf usage on tst-pldd
a1c12fdf3f _Static_assert needs two arguments for compatibility with GCC before 9
a4217408a3 Apply asm redirections in syslog.h before first use [BZ #27087]

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoRevert "mbedtls: import patch to fix illegal instruction on mpc85xx"
Nick Hainke [Tue, 20 Dec 2022 14:31:29 +0000 (15:31 +0100)]
Revert "mbedtls: import patch to fix illegal instruction on mpc85xx"

The commit was pushed into the branch to early. It does not help fixing
illegal instruction bug on mpc85xx. That's why it should be reverted.

This reverts commit de6c3cca4d2b523937403ae2959597a1e48c7351.

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agotools/ccache: fix build with musl and gcc 12
Michal Vasilek [Thu, 8 Dec 2022 12:56:45 +0000 (13:56 +0100)]
tools/ccache: fix build with musl and gcc 12

* refresh patches

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
23 months agorpcd: update to latest Git HEAD
Jo-Philipp Wich [Thu, 15 Dec 2022 23:27:02 +0000 (00:27 +0100)]
rpcd: update to latest Git HEAD

7de4820 iwinfo: add "hwmodes_text" to the info output
b3f530b iwinfo: clean up rpc_iwinfo_call_hw_ht_mode()
c46ad61 iwinfo: reuse infos provided by libiwinfo
6c5e900 iwinfo: constify string map arg for rpc_iwinfo_call_int()

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d15b1fbed7abb6d4d536c32551ce6d73a309889b)

23 months agoiwinfo: update to latest Git HEAD
Jo-Philipp Wich [Thu, 15 Dec 2022 23:18:08 +0000 (00:18 +0100)]
iwinfo: update to latest Git HEAD

8d15809 cli: print current HT mode
8f86dd6 cli: use IWINFO_HTMODE_COUNT
f36b72b cli: use IWINFO_KMGMT_NAMES
91be7e0 cli: use IWINFO_CIPHER_NAMES
49b6ec9 cli: fix printing the scan channel width
b1c8873 cli: fix marking the active channel
9e14e64 utils: add iwinfo_band2ghz() and iwinfo_ghz2band() helpers
e084781 utils: add helper functions to get names by values
d09a77a utils: add iwinfo_htmode_is_{ht|vht|he} helpers
8752977 utils: add and use iwinfo_format_hwmodes()
02f433e lib: add IWINFO_80211_COUNT and IWINFO_80211_NAMES
1d30df1 lib: add IWINFO_BAND_COUNT and IWINFO_BAND_NAMES
aefd0ef lib: use common IWINFO_CIPHER_NAMES strings
a5b30de lib: add IWINFO_OPMODE_COUNT and use it for IWINFO_OPMODE_NAMES
9f29e79 lib: constify and fixup the string array definitions
fddc015 nl80211: mark frequencies where HE operation in not allowed
6d50a7c nl80211: add support for HE htmodes
4ba5713 nl80211: properly get available bands for the hwmode
91b2ada nl80211: update the kernel header nl80211.h
3f619a5 nl80211: fix frequency/channel conversion for the 6G band
a77d915 nl80211: don't guess if a name is an ifname
c27ce71 devices: add usb device MediaTek MT7921AU
14f864e nl80211: add ability to describe USB devices
a5a75fd nl80211: remove ancient wpa_supplicant ctrl socket path
dd4e1ff nl80211: fix wpa supplicant ctrl socket permissions
d638163 fix -Wdangling-else warnings
4aa6c5a fix -Wreturn-type warning
3112726 fix -Wpointer-sign warning
ebd5f84 fix -Wmaybe-uninitialized warning
5469898 fix -Wunused-variable warnings
462b679 fix -Wduplicate-decl-specifier warnings
ccaabb4 fix -Wformat-truncation warnings
50380db enable useful compiler warnings via -Wall

Fixes: https://github.com/openwrt/openwrt/issues/10158
Fixes: https://github.com/openwrt/openwrt/issues/10687
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4a4d0bf78ddbbf17508891c5c837e5eb00420b5c)

23 months agoiwinfo: update to the latest version
Hauke Mehrtens [Tue, 1 Nov 2022 17:00:54 +0000 (18:00 +0100)]
iwinfo: update to the latest version

00aab87 Correctly identify key management algorithms starting with "FT-"

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

23 months agoiwinfo: update to the latest version
Felix Fietkau [Fri, 14 Oct 2022 11:11:16 +0000 (13:11 +0200)]
iwinfo: update to the latest version

0496c722f1d7 nl80211: fix issues with renamed wiphy and multiple phy per device

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 735f5f18ddbcb5c4e2033f1c08be0113369d2b79)

23 months agoiwinfo: update to the latest version
Felix Fietkau [Thu, 22 Sep 2022 13:23:54 +0000 (15:23 +0200)]
iwinfo: update to the latest version

46f04f3808e8 devices: add MediaTek MT7986 WiSoC
b3e08c8b5a8f ops: make support for wireless extensions optional
1f695d9c7f82 nl80211: allow phy names that don't start with 'phy'
b7f9f06e1594 nl80211: fix phy/netdev index lookup
4a43b0d40ba5 nl80211: look up the phy name instead of assuming name == phy<idx>

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit c787962e1d5016cab637cf8857bc6aa3afdda001)

23 months agokernel: add missing dependency to KERNEL_RPI_AXIPERF
Stijn Tintel [Wed, 18 May 2022 10:31:05 +0000 (13:31 +0300)]
kernel: add missing dependency to KERNEL_RPI_AXIPERF

This symbol is added by the bcm27xx target patches so it should depend
on that target.

Fixes: efd9463dcfe2 ("kernel: add missing symbol for bcm27xx")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit d5dc6cdc536277ce1831acce92dc1cbdc59e7250)

23 months agokernel: add missing symbol for bcm27xx
Stijn Tintel [Tue, 17 May 2022 17:50:31 +0000 (20:50 +0300)]
kernel: add missing symbol for bcm27xx

When KERNEL_PERF_EVENTS is enabled in OpenWrt, the RPI_AXIPERF symbol is
exposed. Add a build option for it to fix build failures with
KERNEL_PERF_EVENTS enabled.

Fixes: 3564c22e46d5 ("bcm27xx: disable duplicate sdhost driver")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit efd9463dcfe27681879d18e5fd9a32351447aa25)

23 months agogeneric: add support for EON EN25QX128A spi nor flash
Christian Marangi [Fri, 14 Oct 2022 19:00:39 +0000 (21:00 +0200)]
generic: add support for EON EN25QX128A spi nor flash

Add support for EON EN25QX128A spi nor flash with no flags as it does
support SFDP parsing.

Fixes: #9442
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Szabolcs Hubai <szab.hu@gmail.com> [ramips/mt7621: xiaomi_mi-router-4a-gigabit]
(cherry picked from commit d7876daf6552a9f39bd5e0bf50b554e9406ec275)

23 months agokernel: bump 5.10 to 5.10.159
John Audia [Wed, 14 Dec 2022 15:13:21 +0000 (10:13 -0500)]
kernel: bump 5.10 to 5.10.159

Removed upstreamed:
backport-5.10/888-v6.1-ca8210-Fix-crash-by-zero-initializing-data.patch[1]

All patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.159&id=0a8e66e375736ea12c11f0ef238ba2a8efec460b

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

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

23 months agokernel: bump 5.10 to 5.10.158
John Audia [Thu, 8 Dec 2022 13:49:33 +0000 (08:49 -0500)]
kernel: bump 5.10 to 5.10.158

All patches automatically rebased.

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

23 months agokernel: bump 5.10 to 5.10.157
John Audia [Tue, 6 Dec 2022 18:22:57 +0000 (13:22 -0500)]
kernel: bump 5.10 to 5.10.157

Manually rebased:
backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch
hack-5.10/645-netfilter-connmark-introduce-set-dscpmark.patch

Removed upstreamed:
pending-5.10/706-netfilter-nf_flow_table-add-missing-locking.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.157&id=b8e494240e69f91517256adcd6fda62d0671772d

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

23 months agokernel: add symbol in generic config for 5.10.157
John Audia [Wed, 7 Dec 2022 09:02:49 +0000 (04:02 -0500)]
kernel: add symbol in generic config for 5.10.157

Add CONFIG_INET_TABLE_PERTURB_ORDER=16 to generic config

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

23 months agokernel: kmod-net-rtl8192su: Remove package
Hauke Mehrtens [Sun, 7 Aug 2022 11:24:59 +0000 (13:24 +0200)]
kernel: kmod-net-rtl8192su: Remove package

The R8712U driver depends on cfg80211. cfg80211 is provided by mac80211
backports, we can not build any in kernel drivers which depend on
cfg80211 which is an out of tree module in OpenWrt.

The cfg80211 dependency was added with kernel 5.9.

We could add rtl8192su to backports and build it from there.

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

23 months agoumbim: Allow roaming and partner connections
Julio Gonzalez Gil [Sun, 14 Aug 2022 21:06:31 +0000 (23:06 +0200)]
umbim: Allow roaming and partner connections

Allow registration if the SIM is roaming or partner mode, by adding two
new options to the protocol.

Until now, such registration failed because umbim returns exit codes 4 and
5 for such situations.

Signed-off-by: Julio Gonzalez Gil <git@juliogonzalez.es>
(cherry picked from commit 840ce0a65bbb7ba13a547f90cb94452b290475ef)

23 months agokernel: further cleanup of xfrm[4|6]_mode*
Martin Schiller [Wed, 2 Nov 2022 06:41:04 +0000 (07:41 +0100)]
kernel: further cleanup of xfrm[4|6]_mode*

In my commit da5c45f4d886 ("kernel: remove handling of xfrm[4|6]_mode_*
modules") I missed a few default config options and description entries.
Those should be gone as well.

Fixes: da5c45f4d886 ("kernel: remove handling of xfrm[4|6]_mode_* modules")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
(cherry picked from commit 1e028ac51e4d033cc1a8a06850ca8c6469206761)

23 months agokernel: remove handling of xfrm[4|6]_mode_* modules
Martin Schiller [Wed, 19 Oct 2022 09:21:58 +0000 (11:21 +0200)]
kernel: remove handling of xfrm[4|6]_mode_* modules

For kernel versions before 5.2, the required IPsec modes have to be
enabled explicitly (they are built-in for newer kernels).

Commit 1556ed155a9a ("kernel: mode_beet mode_transport mode_tunnel xfram
modules") tried to handle this, but it does not really work.

Since we don't support these kernel versions anymore and the code is
also broken, let's remove it.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
[Remove old generic config options too]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit da5c45f4d8864a82378b4a04c0516cb98a718cfa)

23 months agokernel: fix typo for tegra crypto-sha1 module
Josef Schlehofer [Tue, 30 Aug 2022 06:51:37 +0000 (08:51 +0200)]
kernel: fix typo for tegra crypto-sha1 module

Fixes: e889489bedfd2830411bd0cf6564b8272aa9c254 ("kernel: build
arm/neon-optimized sha1/512 modules")

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit f8f9d6901c6a7c85e6b18fba665175646fb53ec7)

23 months agokernel: add kmod-btsdio package
Lech Perczak [Sun, 24 Apr 2022 23:51:54 +0000 (01:51 +0200)]
kernel: add kmod-btsdio package

Add package supporting Bluetooth HCI interfaces connected over SDIO.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[pepe2k@gmail.com: dropped rfkill dependency, other minor text fixes]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
(cherry picked from commit fb7547684538e5501c4b91ed62e5f66832e4d9bc)

23 months agokernel: remove CONFIG_MMC_BLOCK_BOUNCE
Tomas Lara [Sun, 7 Aug 2022 00:13:07 +0000 (20:13 -0400)]
kernel: remove CONFIG_MMC_BLOCK_BOUNCE

 CONFIG_MMC_BLOCK_BOUNCE was removed in kernel v4.13-rc1
 https://github.com/torvalds/linux/commit/c3dccb74be28a345a2ebcc224e41b774529b8b8f

Signed-off-by: Tomas Lara <tl849670@gmail.com>
(cherry picked from commit 24307b035143bc710268590850e595e1fad86f08)

23 months agoath79: fix Teltonika RUT230 v1 MAC assignment
David Bauer [Fri, 9 Dec 2022 00:58:03 +0000 (01:58 +0100)]
ath79: fix Teltonika RUT230 v1 MAC assignment

The MAC-Address setup for the Teltonika RUT230 v1 was swapped for the
LAN / WAN ports. Also the Label-MAC was assigned incorrect, as the WiFi
MAC is printed on the case as part of the SSID, however only the LAN
MAC-Address is designated as a MAC-Address.

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

23 months agoramips: add support for Wavlink WS-WN572HP3 4G
Jan-Niklas Burfeind [Wed, 7 Dec 2022 18:12:14 +0000 (19:12 +0100)]
ramips: add support for Wavlink WS-WN572HP3 4G

Wavlink WS-WN572HP3 4G is an 802.11ac
dual-band outdoor router with LTE support.

Specifications;
* Soc: MT7621DAT
* RAM: 128MiB
* Flash: NOR 16MiB GD-25Q128ESIG3
* Wi-Fi:
  * MT7613BEN: 5GHz
  * MT7603EN: 2.4GHz
* Ethernet: 2x 1GbE
* USB: None - only used internally
* LTE Modem: Quectel EC200T-EU
* UART: 115200 baud
* LEDs:
  * 7 blue at the front
    * 1 Power
    * 2 LAN / WAN
    * 1 Status
    * 3 RSSI (annotated 4G)
  * 1 green at the bottom (4G LED)
* Buttons: 1 reset button

Installation:
* press and hold the reset button while powering on the device
* keep it pressed for ten seconds
* connect to 192.168.10.1 via webbrowser (chromium/chrome works, at
  least Firefox 106.0.3 does not)
* upload the sysupgrade image, confirm the checksum, wait 2 minutes
  until the device reboots

Revert to stock firmware:
* same as installation but use the recovery image for WL-WN572HP3

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com>
(cherry picked from commit dce66899bf243d78689afcc693340b891bbf4c2d)

23 months agocomgt-ncm: add support for quectel modem EC200T-EU
Jan-Niklas Burfeind [Wed, 7 Dec 2022 18:12:13 +0000 (19:12 +0100)]
comgt-ncm: add support for quectel modem EC200T-EU

context_type is an integer mapping of pdptype:
1: IPV4
2: IPV6
3: IPV4V6

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
(cherry picked from commit 13f82ce264ed2d02c66cb2cae8f013c8f64a979f)

23 months agorealtek: update GPIO bindings for DGS-1210-10P
Jan-Niklas Burfeind [Fri, 2 Dec 2022 13:55:16 +0000 (14:55 +0100)]
realtek: update GPIO bindings for DGS-1210-10P

add three missing LEDs
 - PoE-Max
 - Link/Act
 - PoE

add two missing buttons
 - mode
 - reset

The last was dropped in
commit 61a3d0075b15 ("realtek: update GPIO bindings in the dts files in dts-5.10")

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
(cherry picked from commit dbc93d280c9d05733e7b45a76ec1a05b77c376a5)

23 months agoustream-ssl: update to Git version 2022-12-07
Hauke Mehrtens [Thu, 8 Dec 2022 00:15:11 +0000 (01:15 +0100)]
ustream-ssl: update to Git version 2022-12-07

9217ab4 ustream-openssl: Disable renegotiation in TLSv1.2 and earlier
2ce1d48 ci: fix building with i.MX6 SDK
584f1f6 ustream-openssl: wolfSSL: provide detailed information in debug builds
aa8c48e cmake: add a possibility to set library version

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

23 months agoCI: kernel: don't checkout and install feeds
Christian Marangi [Wed, 7 Dec 2022 17:12:31 +0000 (18:12 +0100)]
CI: kernel: don't checkout and install feeds

We don't need to checkout feed and install feeds for kernel tests. This
saves up to 2 minutes for each target kernel build test.

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

23 months agoCI: build: skip sdk adapt to external toolchain on cache hit
Christian Marangi [Wed, 7 Dec 2022 17:09:18 +0000 (18:09 +0100)]
CI: build: skip sdk adapt to external toolchain on cache hit

On cache hit, skip sdk adapt to external toolchain. This is needed because we
cache the already extracted sdk and that is already adapted to be used
as external toolchain.

Rerunning the adap step will result in the test to fail for missing file
as the file are already got wrapped to the external toolchain format.

Fixes: 42f0ab028e2e ("CI: build: fix use of sdk as toolchain")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 99eaedfe3966b1ca812e8a962197cf91286247f7)

23 months agoCI: build: fix use of sdk as toolchain
Christian Marangi [Mon, 5 Dec 2022 22:23:04 +0000 (23:23 +0100)]
CI: build: fix use of sdk as toolchain

The toolchain included in a sdk have a different format than an external
toolchain tar.

Since sdk is a more integrated setup doesn't use and include wrapper bin
that use the external toolchain config and use an alternative and more
standard way to include all the toolchain headers.

External toolchain use wrapper.sh to append the configured include
header when each tool is called.

Fix the sdk toolchain by reverting their own sdk wrapper scripts and to
simulate an external toolchain build copying what is done in the
toolchain target makefile.

This handle compilation error and warning caused by not using fortify
header on building packages.

Fixes: 006e52545d14 ("CI: build: add support to fallback to sdk for external toolchain")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 42f0ab028e2eae0d4e7acf9db7fd68b256f23503)

23 months agoramips: mt7621: enable lzma-loader for ZyXEL WAP6805
Bjørn Mork [Mon, 28 Nov 2022 14:45:12 +0000 (15:45 +0100)]
ramips: mt7621: enable lzma-loader for ZyXEL WAP6805

Fixing "Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board
to recover".

Signed-off-by: Bjørn Mork <bjorn@mork.no>
(cherry picked from commit 8719f73fa2beddb259013801ca912b96fbc83543)

23 months agoramips: mt7621: enable lzma-loader for netis WF2881
Joonhyuk Song [Mon, 21 Nov 2022 02:37:36 +0000 (11:37 +0900)]
ramips: mt7621: enable lzma-loader for netis WF2881

Fixes boot loader LZMA decompression issues (LZMA ERROR 1)

Signed-off-by: Joonhyuk Song <thenoface303@gmail.com>
(cherry picked from commit 25ede5170d5fbfd233ba21f7a294ec3a2ddeb635)

23 months agokernel: ca8210: Fix crash by zero initializing data
Hauke Mehrtens [Sun, 20 Nov 2022 20:35:54 +0000 (21:35 +0100)]
kernel: ca8210: Fix crash by zero initializing data

This fixes crashes at bootup on pistachio.

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

23 months agoe2fsprogs: Fix CVE-2022-1304
Hauke Mehrtens [Mon, 5 Dec 2022 23:17:35 +0000 (00:17 +0100)]
e2fsprogs: Fix CVE-2022-1304

This fixes CVE-2022-1304:
An out-of-bounds read/write vulnerability was found in e2fsprogs 1.46.5.
This issue leads to a segmentation fault and possibly arbitrary code
execution via a specially crafted filesystem.

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

23 months agobcm4908: Refresh kernel patches
Hauke Mehrtens [Sat, 12 Nov 2022 21:53:04 +0000 (22:53 +0100)]
bcm4908: Refresh kernel patches

Refresh the kernel patches for this target. No manual changes.

Fixes: 45ac906c641 ("bcm4908: update DTS files with the latest changes")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit b97e5ac785960c13199239dd4821dd53f3801da3)
[ dropped 5.15 change not present in 22.03 ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoucode: update to latest Git HEAD
Jo-Philipp Wich [Wed, 23 Nov 2022 13:15:19 +0000 (14:15 +0100)]
ucode: update to latest Git HEAD

46d93c9 tests: fixup testcases
4c654df types: adjust double printing format
eac2add compiler: fix bytecode for logical assignments of properties
3903b18 fs: add `realpath()` function
8366102 math: add isnan() function
eef83d3 tests: relax sleep() test
394e901 lib: uc_json(): accept trailing whitespace when parsing strings
1867c8b uloop: terminate parent uloop in task child processes
d2cc003 uci: auto-load package in `ctx.foreach()` and `ctx.get_first()`
6c5ee53 compiler: ensure that arrow functions with block bodies return no value
fdc9b6a compiler: fix `??=`, `||=` and `&&=` logical assignment semantics
88dcca7 add cmake to install requires for debian

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a4d67066e39bd93c7011c8e07b740a326e4e9803)

23 months agomvebu: disable also wrt32x due to broken switch
Hannu Nyman [Tue, 6 Dec 2022 08:36:56 +0000 (10:36 +0200)]
mvebu: disable also wrt32x due to broken switch

WRT32x has identical hardware as WRT3200ACM,
so handle the devices identically.

Reference to:
* FCC approval: WRT32x is a new name for WRT3200ACM hardware
  https://fccid.io/Q87-WRT3200ACM#Grant-TCB-5
    FCC IDENTIFIER: | Q87-WRT3200ACM
    C2PC: - Adding a new model name: WRT32X;

* Linux switch definition:
  https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=2716777b4f21649fb907b4a4fb96e1c8d0a5ec16
    MV88E6176 is mostly compatible to MV88E6352 and is documented
    in the same functional specification. Add support for it.

Fixes: a0bae2fef8 "mvebu: cortexa9: disable devices using broken mv88e6176 switch"
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
23 months agokernel: netconsole: add network console logging support
Catalin Toda [Fri, 15 Jul 2022 17:18:23 +0000 (10:18 -0700)]
kernel: netconsole: add network console logging support

Accessing the console on many devices is difficult.
netconsole eases debugging on devices that crash
after the network is up.

Reference to the netconsole documentation in upstream Linux:
<https://www.kernel.org/doc/html/latest/networking/netconsole.html>
|
|netconsole=[+][src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr]
|
| where
|  +            if present, enable extended console support
|  src-port     source for UDP packets (defaults to 6665)
|  src-ip       source IP to use (interface address)
|  dev          network interface (eth0)
|  tgt-port     port for logging agent (6666)
|  tgt-ip       IP address for logging agent
|  tgt-macaddr  ethernet MAC address for logging agent (broadcast)

OpenWrt specific notes:

OpenWrt's device userspace scripts are attaching the network
interface (i.e. eth0) to a (virtual) bridge (br-lan) device.
This will cause netconsole to report:
|network logging stopped on interface eth0 as it is joining a master device
(and unfortunately the traffic/logs to stop at this point)

As a workaround, the netconsole module can be manually loaded
again after the bridge has been setup with:

 insmod netconsole netconsole=@/br-lan,@192.168.1.x/MA:C...

One way of catching errors before the handoff, try to
append the /etc/modules.conf file with the following extra line:
 options netconsole netconsole=@/eth0,@192.168.1.x/MA:C...

and install the kmod-netconsole (=y) into the base image.

Signed-off-by: Catalin Toda <catalinii@yahoo.com>
(Added commit message from PR, added links to documentation)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 488b25f5ac5028923f67e3beade92dab0c2591f1)

23 months agokernel: kmod-isdn4linux: Remove package
Hauke Mehrtens [Sun, 7 Aug 2022 13:13:36 +0000 (15:13 +0200)]
kernel: kmod-isdn4linux: Remove package

The isdn4linux drivers and subsystem was removed in kernel 5.3, remove
the kernel package also from OpenWrt.

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

23 months agokernel: kmod-w1-slave-ds2760: Remove package
Hauke Mehrtens [Sun, 7 Aug 2022 11:32:31 +0000 (13:32 +0200)]
kernel: kmod-w1-slave-ds2760: Remove package

The w1_ds2760.ko driver was merged into the ds2760_battery.ko driver.
The driver was removed and this package was never build any more.
This happened with kernel 4.19.

Remove this unused package.

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

23 months agokernel: kmod-rtc-pt7c4338: Remove package
Hauke Mehrtens [Sun, 7 Aug 2022 12:42:01 +0000 (14:42 +0200)]
kernel: kmod-rtc-pt7c4338: Remove package

The rtc-pt7c4338.ko was never upstream under this name, the driver was
removed from OpenWrt some years ago, remove the kmod-rtc-pt7c4338
package too.

Fixes: 74d00a8c3849 ("kernel: split patches folder up into backport, pending and hack folders")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 5ccf4dcf8864c1d940b65067d8c6f7c4e5858ae2)

23 months agomvebu: cortexa9: disable devices using broken mv88e6176 switch
Petr Štetiar [Thu, 1 Dec 2022 09:36:01 +0000 (10:36 +0100)]
mvebu: cortexa9: disable devices using broken mv88e6176 switch

Several users have reported, that devices using mv88e6176 switch are
seriously broken, basically turning that switch into a hub. Until fixed
those devices should be disabled.

I've used TOH with "Switch 88E6176" filter, which provided me with the
following list of likely affected devices:

 * Linksys WRT1200AC v1/v2, WRT1900AC v1/v2
 * SolidRun ClearFog Pro
 * Turris Omnia

That device list more or less corresponds with the list of devices
mentioned in the linked bug reports.

References: https://github.com/openwrt/openwrt/issues/11077
Signed-off-by: Petr Štetiar <ynezz@true.cz>
23 months agoCI: trigger check also on build and check-kernel-patches workflow change
Christian Marangi [Sun, 4 Dec 2022 19:58:11 +0000 (20:58 +0100)]
CI: trigger check also on build and check-kernel-patches workflow change

Since kernel and packages workflow now use a shared build workflow, they
also need to react on changes on these shared workflow.

Fix this and add these shared workflow to the event paths to check.

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

23 months agoCI: build: fix matching for openwrt release branch for toolchain parsing
Christian Marangi [Sun, 4 Dec 2022 19:36:11 +0000 (20:36 +0100)]
CI: build: fix matching for openwrt release branch for toolchain parsing

The current match logic doesn't handle test for push events related to
stable release (example openwrt-22.03) but only fork with the related
prefix (example openwrt-22.03-fixup)

Fix wrong matching and while at it also add extra checks to other
matching (check if the branch name actually start with the requested
prefix)

Fixes: e24a1e6f6d7f ("CI: build: add support for external toolchains from stable branch")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit e3cf2b84e5f8708ca17d931ef60746516c8a2fe4)

23 months agoCI: fix matching for openwrt release branch for container selection
Christian Marangi [Sun, 4 Dec 2022 19:28:28 +0000 (20:28 +0100)]
CI: fix matching for openwrt release branch for container selection

The current match logic doesn't handle test for push events related to
stable release (example openwrt-22.03) but only fork with the related
prefix (example openwrt-22.03-fixup)

Fix wrong matching and while at it also add extra checks to other
matching (check if the branch name actually start with the requested
prefix)

Fixes: abe8a4824210 ("CI: build: add support for per branch tools container")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 65c3d19c4b28ccac0d08d916de0ffa4c0e7b3dc2)

23 months agoCI: build: add support to fallback to sdk for external toolchain
Christian Marangi [Mon, 28 Nov 2022 15:12:13 +0000 (16:12 +0100)]
CI: build: add support to fallback to sdk for external toolchain

Add support to use sdk as external toolchain if the packaged external
toolchain tar is not found on openwrt servers for build shared workflow.

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

23 months agoCI: build: add support for external toolchains from stable branch
Christian Marangi [Mon, 28 Nov 2022 11:44:01 +0000 (12:44 +0100)]
CI: build: add support for external toolchains from stable branch

Add support to use external toolchains from stable branch if we are
testing commit targeting stable openwrt branch in kernel and packages
workflow.

With pr the target branch is parsed and the right toolchain is used.

To use the stable toolchain for local testing the branch needs to have
the prefix openwrt-[0-9][0-9].[0-9][0-9]- (example openwrt-21.02-fixup)

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

23 months agoCI: build: add support for per branch tools container
Christian Marangi [Sun, 27 Nov 2022 18:53:08 +0000 (19:53 +0100)]
CI: build: add support for per branch tools container

Add support in build shared workflow for per branch tools container.

With pr the target branch is parsed and the right container is used.

To use the stable container for local testing the branch needs to have
the prefix openwrt-[0-9][0-9].[0-9][0-9]- (example openwrt-21.02-fixup)

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

23 months agoCI: tools: support per branch tools container
Christian Marangi [Sun, 27 Nov 2022 18:45:38 +0000 (19:45 +0100)]
CI: tools: support per branch tools container

Add support to push per branch container tools.
For anything not official stick to latest tag that correspond to test
run from master.

If we are testing something for one of the openwrt stable branch, parse
the branch name or the tag and push dedicated tools containers.

To use the stable container for local testing the branch needs to have
the prefix openwrt-[0-9][0-9].[0-9][0-9] (example openwrt-21.02-fixup)

Any branch that will match this pattern openwrt-[0-9][0-9].[0-9][0-9]
will refresh the tools container with the matching tag.
(example branch openwrt-22.03 -> tools:openwrt-22.03)
(example branch openwrt-22.03-test -> tools:openwrt-22.03)

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

23 months agoCI: Build all boards and testing kernel
Hauke Mehrtens [Sat, 3 Dec 2022 02:04:40 +0000 (03:04 +0100)]
CI: Build all boards and testing kernel

This adds options to build all boards of a selected target and an
additional option to build the testing kernel instead of the normal
kernel. This can be used by other trigger work flows.

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

23 months agoCI: Allow building with internal toolchain
Hauke Mehrtens [Sat, 5 Nov 2022 13:27:11 +0000 (14:27 +0100)]
CI: Allow building with internal toolchain

This adds an option to build with internal toolchain. This can be used
to build targets which are currently not build by the OpenWrt build bots
and which needs their own toolchain build for every build.

Building the toolchain takes about 30 minutes compared to using the
external toolchain which takes some seconds.

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

23 months agoCI: Extract the OpenWrt building to own sub workflow
Hauke Mehrtens [Tue, 1 Nov 2022 18:10:01 +0000 (19:10 +0100)]
CI: Extract the OpenWrt building to own sub workflow

Extract the building of OpenWrt into an own workflow which is then
triggered by the kernel.yml and packages.yml workflow with different
inputs. This allows us to share much of the code of the workflow.

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

23 months agoCI: Simplify if conditions
Hauke Mehrtens [Sat, 5 Nov 2022 13:38:35 +0000 (14:38 +0100)]
CI: Simplify if conditions

There is no need to put a ${{ }} around the if conditions.

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

23 months agoCI: packages.yml: Fix usage of pre-build tools
Hauke Mehrtens [Wed, 2 Nov 2022 21:17:51 +0000 (22:17 +0100)]
CI: packages.yml: Fix usage of pre-build tools

Activate CONFIG_AUTOREMOVE to match the settings used to build the
pre-build tools. This has to match the pre-build tools to not rebuild
them.

This prevents the tools being rebuild in packages.yml.

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

23 months agoCI: packages: Add github CI job to build all packages
Hauke Mehrtens [Sun, 7 Aug 2022 16:46:11 +0000 (18:46 +0200)]
CI: packages: Add github CI job to build all packages

This will build OpenWrt for MIPS malta BE and x86 64 Bit with all
packages and kernel modules activated. It is triggered when something
changes in the build system or when a package definition is changed.
This task probably needs 90 minutes to execute, but I hope that it
will find build problems in pull requests early.

This intentionally does not activate the feeds, because building them
too would take too long. We only build x86/64 and malta/be to save
resources.

I would like to detect build problems when a package is changed. We
often had build breaks when a package version was increased sometime
even in other packages which used it as a dependency.

This is based on the .github/workflows/packages.yml workflow.

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

23 months agoCI: kernel: fix deprecation of set-output
Christian Marangi [Fri, 21 Oct 2022 14:09:19 +0000 (16:09 +0200)]
CI: kernel: fix deprecation of set-output

From [0], github deprecated set-output with a better approach of
appending variables to $GITHUB_OUTPUT

[0] https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

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

23 months agoci: kernel: trigger build check on changes in kernel.mk as well
Petr Štetiar [Wed, 19 Oct 2022 21:02:43 +0000 (23:02 +0200)]
ci: kernel: trigger build check on changes in kernel.mk as well

So we can QA more parts of kernel build process.

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

23 months agoCI: kernel: check if patch are refreshed for each target
Christian Marangi [Sat, 15 Oct 2022 08:56:46 +0000 (10:56 +0200)]
CI: kernel: check if patch are refreshed for each target

Enforce refreshed patch for each target with kernel pr tests.

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

23 months agoCI: bump actions/download,upload-artifact action to v3
Christian Marangi [Wed, 12 Oct 2022 14:48:46 +0000 (16:48 +0200)]
CI: bump actions/download,upload-artifact action to v3

Bump actions/download,upload-artifact action to v3 on every workflow
to mute node deprecation warning.

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

23 months agoCI: bump actions/checkout action to v3
Christian Marangi [Wed, 12 Oct 2022 13:24:11 +0000 (15:24 +0200)]
CI: bump actions/checkout action to v3

Bump actions/checkout action to v3 on every workflow to mute node
deprecation warning.

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

23 months agoCI: kernel: generate ccache cache on kernel push
Christian Marangi [Sat, 8 Oct 2022 17:25:54 +0000 (19:25 +0200)]
CI: kernel: generate ccache cache on kernel push

To actually use ccache cache on kernel test from pr, the kernel workflow
has to be run first from a push action.

This will permit as a side effect to test merged commits and catch commit
that may cause regression in kernel compilation even outside the github
system.

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

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 agoRevert "build: harden GitHub workflow permissions"
Christian Marangi [Sun, 4 Dec 2022 16:05:51 +0000 (17:05 +0100)]
Revert "build: harden GitHub workflow permissions"

This reverts commit 008e9a335dc32c4662aa56eb67487ddd777f2147.

We now have the full CI backported to openwrt-22.03. We need to revert
this subset and apply the full backport commit.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoCI: kernel: use ccache to speedup workflow
Christian Marangi [Tue, 4 Oct 2022 16:43:38 +0000 (18:43 +0200)]
CI: kernel: use ccache to speedup workflow

Use ccache to speedup kernel compilation.
Ccache dir is cached across each build test. To refresh ccache directory
we generate an hash of the kernel include files, that includes the
kernel versions of every kernel supported and the kernel compile
includes.

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

23 months agoCI: tools: compile tools with ccache support for tools container
Christian Marangi [Tue, 4 Oct 2022 16:38:57 +0000 (18:38 +0200)]
CI: tools: compile tools with ccache support for tools container

Enable ccache support for tools container, useful to speedup other
workflow even more.

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

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 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 agobuild: handle directory with whitespace in AUTOREMOVE clean
Christian Marangi [Wed, 7 Sep 2022 21:50:36 +0000 (23:50 +0200)]
build: handle directory with whitespace in AUTOREMOVE clean

Package with whitespace in their build directory are not correctly
removed when CONFIG_AUTOREMOVE is enabled. This is caused by xargs that
use whitespace as delimiters. To handle this use \0 as the delimiter and
set find to use \0 as the delimiter.

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

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)