From 7ad1fa12efd99dd2a4e4ffa01365280f63e99e55 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 14 May 2023 18:01:20 +0200 Subject: [PATCH 01/14] kernel: ltq-ptm: fix compilation warning for vr9 Fix compilation warning for unused variable for vr9. Fix compilation warning: /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xrx200/ltq-ptm-vr9/ltq-ptm/ifxmips_ptm_vdsl.c: In function 'mailbox_irq_handler': /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-lantiq_xrx200/ltq-ptm-vr9/ltq-ptm/ifxmips_ptm_vdsl.c:560:9: error: unused variable 'i' [-Werror=unused-variable] 560 | int i; | ^ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi --- package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c index d751680853a..1007e74cec4 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c @@ -557,7 +557,6 @@ static inline int get_tx_desc(unsigned int itf, unsigned int *f_full) static irqreturn_t mailbox_irq_handler(int irq, void *dev_id) { unsigned int isr; - int i; isr = IFX_REG_R32(MBOX_IGU1_ISR); IFX_REG_W32(isr, MBOX_IGU1_ISRC); From aae41e6e8f9e23cf10826501c1eae51c648981a6 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 14 May 2023 14:16:02 +0200 Subject: [PATCH 02/14] strace: update to 6.3 Release Notes: https://github.com/strace/strace/releases/tag/v6.3 Signed-off-by: Nick Hainke --- package/devel/strace/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile index ce9122cc8a3..9400608cddf 100644 --- a/package/devel/strace/Makefile +++ b/package/devel/strace/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=strace -PKG_VERSION:=6.2 +PKG_VERSION:=6.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION) -PKG_HASH:=0c7d38a449416268d3004029a220a15a77c2206a03cc88120f37f46e949177e8 +PKG_HASH:=e17878e301506c1cc301611118ad14efee7f8bcef63b27ace5d290acce7bb731 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=LGPL-2.1-or-later From 22ff416483c13ff312e199b0f7c31ffd3d733fc1 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Mon, 15 May 2023 12:28:24 +0200 Subject: [PATCH 03/14] ethtool: update to 6.3 Release Notes: https://lore.kernel.org/netdev/20230508213111.z4vjg6gyrm7nwz4r@lion.mk-sys.cz/ Signed-off-by: Nick Hainke --- package/network/utils/ethtool/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/utils/ethtool/Makefile b/package/network/utils/ethtool/Makefile index b18320bf05d..10fecd4a9c5 100644 --- a/package/network/utils/ethtool/Makefile +++ b/package/network/utils/ethtool/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ethtool -PKG_VERSION:=6.2 +PKG_VERSION:=6.3 PKG_RELEASE:=1 PKG_MAINTAINER:=Felix Fietkau PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/ethtool -PKG_HASH:=86df0114064d4d73f6bf72bf03e85c33964a519ee0c1d1ba65005ad2d0e570e1 +PKG_HASH:=d9425f0a3df138734001fccc4175fe178c025f938460ac25c4ebc39960168822 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING From d97143fadc65058754497d8757c0d63fc22b503a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20VAR=C3=88NE?= Date: Fri, 5 May 2023 14:54:03 +0200 Subject: [PATCH 04/14] ath79: mikrotik: bump compat version for yafut images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Following 5264296, Mirotik NAND devices now use yafut to flash the kernel on devices. This method is incompatible with the old-style "kernel2minor" flash mechanism. Even though NAND images were disabled in default build since 21.02, a user flashing a new-style image onto an old-style image would result in in a soft-brick[1]. In order to prevent such accidental mishap, especially as these device images will be reenabled in the upcoming release, bump the compat version. After the new image is flashed, the compat version can be updated: uci set system.@system[0].compat_version='1.1' uci commit [1] https://github.com/openwrt/openwrt/pull/12225#issuecomment-1517529262 Cc: Michał Kępień Signed-off-by: Thibaut VARÈNE Reviewed-by: Robert Marko --- target/linux/ath79/image/common-mikrotik.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/linux/ath79/image/common-mikrotik.mk b/target/linux/ath79/image/common-mikrotik.mk index ce349b60b1d..b37c8b71970 100644 --- a/target/linux/ath79/image/common-mikrotik.mk +++ b/target/linux/ath79/image/common-mikrotik.mk @@ -18,4 +18,8 @@ endef define Device/mikrotik_nand $(Device/mikrotik) IMAGE/sysupgrade.bin = append-kernel | sysupgrade-tar | append-metadata + DEVICE_COMPAT_MESSAGE := \ + NAND images switched to yafut. If running older image, reinstall from initramfs. + DEVICE_COMPAT_VERSION := 1.1 + endef From d3c3b79c1e46c49cfa5de9df6a740d5fcda46471 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Fri, 12 May 2023 03:48:47 -0400 Subject: [PATCH 05/14] libunistring: add from packages feed Add libunistring in order to link to gettext and other packages directly instead of the built-in substitute for it. Signed-off-by: Michael Pratt --- package/libs/libunistring/Makefile | 64 ++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 package/libs/libunistring/Makefile diff --git a/package/libs/libunistring/Makefile b/package/libs/libunistring/Makefile new file mode 100644 index 00000000000..9b41cc3ce38 --- /dev/null +++ b/package/libs/libunistring/Makefile @@ -0,0 +1,64 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libunistring +PKG_VERSION:=1.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@GNU/$(PKG_NAME) +PKG_HASH:=827c1eb9cb6e7c738b171745dac0888aa58c5924df2e59239318383de0729b98 + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +PKG_LICENSE:=GPL-3.0 +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:gnu:$(PKG_NAME) + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/libunistring + SECTION:=libs + CATEGORY:=Libraries + TITLE:=libunistring + URL:=https://www.gnu.org/software/libunistring +endef + +define Package/libunistring/description + This library provides functions for manipulating Unicode strings + and for manipulating C strings according to the Unicode standard. +endef + +HOST_CFLAGS += $(HOST_FPIC) + +TARGET_CFLAGS += $(FPIC) + +HOST_CONFIGURE_ARGS += \ + --enable-static \ + --disable-shared \ + --without-libiconv-prefix \ + --with-pic + +CONFIGURE_ARGS += \ + --enable-static \ + --enable-shared \ + --without-libiconv-prefix \ + --with-pic + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/include/unistring + $(CP) $(PKG_INSTALL_DIR)/usr/include/unistring/*.h $(1)/usr/include/unistring/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunistring.{a,so*} $(1)/usr/lib/ +endef + +define Package/libunistring/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunistring.so.* $(1)/usr/lib/ +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,libunistring)) From 02884158771b0ec945c7cdfaf83d13841324d666 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Sat, 13 May 2023 18:55:44 -0400 Subject: [PATCH 06/14] gettext-full: add missing link to libunistring Running autoreconf or autogen.sh is causing the gettext-runtime subdirectory to have a configure script that looks for and attempts to link to an external libunistring. However, the macros and symbols for supporting that configuration are not present in this subdirectory yet. This results in some host machines to not build the included libunistring objects for libgrt, but at the same time, also not input the proper flag to the linker for linking to an external library when it is found or even when explicitly setting configuration to use a prefix for libunistring, resulting in the common linking failure "undefined reference". Some similar (and old...) upstream commits do the same thing, but only for gettext-tools and libgettextpo. Ref: ae943bcc1 ("Link with libunistring, if it exists.") # gettext.git Ref: 61e21a72f ("Avoid link error in programs that use libgettextpo.") # gettext.git Signed-off-by: Michael Pratt --- .../200-libunistring-missing-link.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 package/libs/gettext-full/patches/200-libunistring-missing-link.patch diff --git a/package/libs/gettext-full/patches/200-libunistring-missing-link.patch b/package/libs/gettext-full/patches/200-libunistring-missing-link.patch new file mode 100644 index 00000000000..2e1dbf84e87 --- /dev/null +++ b/package/libs/gettext-full/patches/200-libunistring-missing-link.patch @@ -0,0 +1,21 @@ +--- a/autogen.sh ++++ b/autogen.sh +@@ -78,6 +78,7 @@ if ! $skip_gnulib; then + getopt-gnu + gettext-h + havelib ++ libunistring-optional + memmove + noreturn + progname +--- a/gettext-runtime/src/Makefile.am ++++ b/gettext-runtime/src/Makefile.am +@@ -40,7 +40,7 @@ envsubst_SOURCES = envsubst.c + + # Link dependencies. + # Need @LTLIBICONV@ because striconv.c uses iconv(). +-LDADD = ../gnulib-lib/libgrt.a @LTLIBINTL@ @LTLIBICONV@ $(WOE32_LDADD) ++LDADD = ../gnulib-lib/libgrt.a $(LTLIBUNISTRING) @LTLIBINTL@ @LTLIBICONV@ $(WOE32_LDADD) + + # Specify installation directory, for --enable-relocatable. + gettext_CFLAGS = -DINSTALLDIR=\"$(bindir)\" From 0779c47be6e6a12ba7a1dca7526f12a10b48b64f Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Sat, 13 May 2023 18:53:00 -0400 Subject: [PATCH 07/14] gettext-full: link to local libunistring Configure gettext to require and link to our local libunistring explicitly. Signed-off-by: Michael Pratt --- package/libs/gettext-full/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/libs/gettext-full/Makefile b/package/libs/gettext-full/Makefile index c8700de550a..1ed0e82df05 100644 --- a/package/libs/gettext-full/Makefile +++ b/package/libs/gettext-full/Makefile @@ -22,10 +22,10 @@ PKG_LICENSE:=GPL-3.0-or-later PKG_CPE_ID:=cpe:/a:gnu:gettext PKG_INSTALL:=1 -PKG_BUILD_DEPENDS:=gettext-full/host libxml2 +PKG_BUILD_DEPENDS:=gettext-full/host libunistring libxml2 PKG_BUILD_PARALLEL:=0 -HOST_BUILD_DEPENDS:=gperf/host libxml2/host +HOST_BUILD_DEPENDS:=gperf/host libunistring/host libxml2/host HOST_BUILD_PARALLEL:=0 PKG_SUBDIRS:= \ @@ -87,6 +87,7 @@ CONFIGURE_ARGS += \ --with-included-gettext \ --without-libintl-prefix \ --without-libexpat-prefix \ + --with-libunistring-prefix=$(STAGING_DIR)/usr \ --with-libxml2-prefix=$(STAGING_DIR) \ --without-emacs @@ -98,6 +99,7 @@ HOST_CONFIGURE_ARGS += \ --disable-java \ --disable-openmp \ --without-emacs \ + --with-libunistring-prefix=$(STAGING_DIR_HOSTPKG) \ --with-libxml2-prefix=$(STAGING_DIR_HOSTPKG) HOST_CONFIGURE_VARS += \ From fff878c5bcda6dea337c97a95721bf8cf73e4560 Mon Sep 17 00:00:00 2001 From: Linhui Liu Date: Sun, 7 May 2023 16:05:45 +0800 Subject: [PATCH 08/14] toolchain/musl: update to 1.2.4 Release notes: new features: - large dns record lookups via tcp fallback - new getaddrinfo EAI_NODATA result to distinguish NODATA/NxDomain - support for new RELR compressed format for relative relocations - sysconf keys for querying signal stack size requirements - real vfork on riscv64 performance: - mallocng no longer uses MADV_FREE (high performance cost, little gain) - vdso clock_gettime is supported once again on 32-bit arm compatibility: - gethostbyname family now distinguishes NO_DATA from HOST_NOT_FOUND - res_send now works with caller-provided edns0 queries - arpa/nameser.h RR types list is now up-to-date - previously-missing POSIX confstr keys have been added - mntent interfaces now accept missing fields - alt signal stack, if any, is now used for internal signals - the LFS64 macros are no longer exposed without _LARGEFILE64_SOURCE - memmem (POSIX-future) is now exposed in default feature profile - pthread_atfork now admits calls from an application-provided malloc - debugger tracking of shared libraries now works on MIPS PIE binaries - sendmsg now supports up to SCM_MAX_FD fds in SCM_RIGHTS messages bugs fixed: - gethostbyname[2]_r wrongly returned nonzero (error) on negative result - parallel v4/v6 address queries could fail on query id collisions - spurious getaddrinfo/AI_ADDRCONFIG failures due to errno clobbering - dns search domains ending in dot (including lone dot) broke lookups - ipv6 servers in resolv.conf broke lookups on systems with v6 disabled - systems with bindv6only failed to query both v4 and v6 nameservers - res_mkquery mishandled consecutive final dots in name - res_send could malfunction for very small answer buffer sizes - resolver dns backend accepted answers with wrong (A vs AAAA) RR type - getservbyport_r returned junk or ENOENT (vs ERANGE) on buffer size errors - dns result parsing of malformed responses could process uninitialized data - freopen didn't reset stream orientation (byte/wide) & encoding rule - fwprintf didn't print most fields on open_wmemstream FILEs - wide printf %lc ignored field width - wide printf erroneously processed %n after encoding errors - use of wide printf %9$ argument slot overflowed undersized buffer - swprintf malfunctioned on nul character in output - strverscmp ordered digit sequences vs nondigits incorrectly - timer_create/SIGEV_THREAD failure leaked the thread - semaphores were subject to missed-wake under certain usage patterns - several possible rare deadlocks with lock handling at thread exit - several possible rare deadlocks with aio and multithreaded fork - dynamic linker relro processing was broken on archs w/variable pagesize - async cancellation could run cancellation handlers in invalid context - pthread_detach was wrongly a cancellation point in rare race code path - use-after-close/double-close errors in mq_notify error paths - mq_notify event thread wrongly ran with signals unmasked - wcs{,n}cmp, wmemcmp returned wrong results when difference overflowed - accept4, pipe2, and dup3 handled unknown flags wrong in fallback cases - CPU_SETSIZE macro had wrong unit - select fallback for pre-time64 kernels truncated timeout (vs clamping) arch-specific bugs fixed: - x32 new socketcalls took fallback path due to pointer sign extension - x32 wait4 didn't fill rusage structure (time64 regression) - x32 semtimedop mismatched timespec ABI with kernel (time64 regression) - sigaction signal mask was bogus on or1k, microblaze, mips, and riscv - powerpc-sf longjmp asm clobbered value argument - or1k poll function passed timeout to syscall in wrong form Removed upstreamed: - 800-mips_pie_debug.patch Manually rebased: - 600-nftw-support-common-gnu-extension.patch Signed-off-by: Linhui Liu --- toolchain/musl/common.mk | 4 +- ...00-nftw-support-common-gnu-extension.patch | 12 ++-- .../musl/patches/800-mips_pie_debug.patch | 61 ------------------- 3 files changed, 8 insertions(+), 69 deletions(-) delete mode 100644 toolchain/musl/patches/800-mips_pie_debug.patch diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk index 040127c3bcc..0901fe7d6f4 100644 --- a/toolchain/musl/common.mk +++ b/toolchain/musl/common.mk @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk PKG_NAME:=musl -PKG_VERSION:=1.2.3 +PKG_VERSION:=1.2.4 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://musl.libc.org/releases/ -PKG_HASH:=7d5b0b6062521e4627e099e4c9dc8248d32a30285e959b7eecaa780cf8cfd4a4 +PKG_HASH:=7a35eae33d5372a7c0da1188de798726f68825513b7ae3ebe97aaaa52114f039 LIBC_SO_VERSION:=$(PKG_VERSION) PATCH_DIR:=$(PATH_PREFIX)/patches diff --git a/toolchain/musl/patches/600-nftw-support-common-gnu-extension.patch b/toolchain/musl/patches/600-nftw-support-common-gnu-extension.patch index 2a7436cf848..7a1ab3f99a3 100644 --- a/toolchain/musl/patches/600-nftw-support-common-gnu-extension.patch +++ b/toolchain/musl/patches/600-nftw-support-common-gnu-extension.patch @@ -33,7 +33,7 @@ Signed-off-by: Tony Ambardar #include #include #include -@@ -72,8 +73,20 @@ static int do_nftw(char *path, int (*fn) +@@ -74,8 +75,20 @@ static int do_nftw(char *path, int (*fn) if (!fd_limit) close(dfd); } @@ -56,7 +56,7 @@ Signed-off-by: Tony Ambardar for (; h; h = h->chain) if (h->dev == st.st_dev && h->ino == st.st_ino) -@@ -101,7 +114,10 @@ static int do_nftw(char *path, int (*fn) +@@ -103,7 +116,10 @@ static int do_nftw(char *path, int (*fn) strcpy(path+j+1, de->d_name); if ((r=do_nftw(path, fn, fd_limit-1, flags, &new))) { closedir(d); @@ -68,7 +68,7 @@ Signed-off-by: Tony Ambardar } } closedir(d); -@@ -112,8 +128,16 @@ static int do_nftw(char *path, int (*fn) +@@ -114,8 +130,16 @@ static int do_nftw(char *path, int (*fn) } path[l] = 0; @@ -87,9 +87,9 @@ Signed-off-by: Tony Ambardar return 0; } -@@ -139,4 +163,5 @@ int nftw(const char *path, int (*fn)(con +@@ -140,3 +164,5 @@ int nftw(const char *path, int (*fn)(con + pthread_setcancelstate(cs, 0); return r; } - ++ +#undef nftw64 - weak_alias(nftw, nftw64); diff --git a/toolchain/musl/patches/800-mips_pie_debug.patch b/toolchain/musl/patches/800-mips_pie_debug.patch deleted file mode 100644 index 80fe15e8418..00000000000 --- a/toolchain/musl/patches/800-mips_pie_debug.patch +++ /dev/null @@ -1,61 +0,0 @@ -Fix DT_DEBUG handling on MIPS in musl libc. -With this change gdb will load the symbol files for shared libraries on MIPS too. - -This patch was taken from this thread: https://www.openwall.com/lists/musl/2022/01/09/4 - ---- a/arch/mips/reloc.h -+++ b/arch/mips/reloc.h -@@ -29,6 +29,7 @@ - - #define NEED_MIPS_GOT_RELOCS 1 - #define DT_DEBUG_INDIRECT DT_MIPS_RLD_MAP -+#define DT_DEBUG_INDIRECT_REL DT_MIPS_RLD_MAP_REL - #define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT)) - - #define CRTJMP(pc,sp) __asm__ __volatile__( \ ---- a/arch/mips64/reloc.h -+++ b/arch/mips64/reloc.h -@@ -38,6 +38,7 @@ - - #define NEED_MIPS_GOT_RELOCS 1 - #define DT_DEBUG_INDIRECT DT_MIPS_RLD_MAP -+#define DT_DEBUG_INDIRECT_REL DT_MIPS_RLD_MAP_REL - #define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT)) - - #define CRTJMP(pc,sp) __asm__ __volatile__( \ ---- a/arch/mipsn32/reloc.h -+++ b/arch/mipsn32/reloc.h -@@ -29,6 +29,7 @@ - - #define NEED_MIPS_GOT_RELOCS 1 - #define DT_DEBUG_INDIRECT DT_MIPS_RLD_MAP -+#define DT_DEBUG_INDIRECT_REL DT_MIPS_RLD_MAP_REL - #define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT)) - - #define CRTJMP(pc,sp) __asm__ __volatile__( \ ---- a/ldso/dynlink.c -+++ b/ldso/dynlink.c -@@ -1923,6 +1923,10 @@ void __dls3(size_t *sp, size_t *auxv) - size_t *ptr = (size_t *) app.dynv[i+1]; - *ptr = (size_t)&debug; - } -+ if (app.dynv[i]==DT_DEBUG_INDIRECT_REL) { -+ size_t *ptr = (size_t *)((size_t)&app.dynv[i] + app.dynv[i+1]); -+ *ptr = (size_t)&debug; -+ } - } - - /* This must be done before final relocations, since it calls ---- a/src/internal/dynlink.h -+++ b/src/internal/dynlink.h -@@ -92,6 +92,10 @@ struct fdpic_dummy_loadmap { - #define DT_DEBUG_INDIRECT 0 - #endif - -+#ifndef DT_DEBUG_INDIRECT_REL -+#define DT_DEBUG_INDIRECT_REL 0 -+#endif -+ - #define AUX_CNT 32 - #define DYN_CNT 32 - From 6ff12094cd4789ba992b07eed2237a7ad958eb98 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 8 May 2023 12:47:29 +0200 Subject: [PATCH 09/14] libselinux: fix compilation with musl 1.2.4 musl 1.2.4 deprecated legacy "LFS64" ("large file support") interfaces so just having _GNU_SOURCE defined is not enough anymore. _LARGEFILE64_SOURCE has to be defined in the source, or CFLAGS can be used to pass -D_LARGEFILE64_SOURCE to allow to keep using LFS64 definitions. Signed-off-by: Robert Marko --- package/libs/libselinux/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/libs/libselinux/Makefile b/package/libs/libselinux/Makefile index 7246d855668..a7942704504 100644 --- a/package/libs/libselinux/Makefile +++ b/package/libs/libselinux/Makefile @@ -115,6 +115,7 @@ HOST_MAKE_FLAGS += \ ifeq ($(CONFIG_USE_MUSL),y) MAKE_FLAGS += FTS_LDLIBS=-lfts +TARGET_CFLAGS += -D_LARGEFILE64_SOURCE endif MAKE_FLAGS += \ From 1cb8cdbf07236f9d16a4bdd733d5eadd834f6e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 15 May 2023 17:52:16 +0200 Subject: [PATCH 10/14] ci: use new buildbot worker images with Debian 11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Debian 10 LTS support ends on 6/2024, so it makes no sense to use it as a base for 23.05 release, so lets switch to Debian 11 which should've LTS support till 6/2026. References: https://github.com/openwrt/buildbot/commit/f2744543fa8027117b254ba2f4fa4366149d5bfb Signed-off-by: Petr Štetiar --- .github/workflows/Dockerfile.tools | 2 +- .github/workflows/build-tools.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Dockerfile.tools b/.github/workflows/Dockerfile.tools index a3804750445..df5892618a7 100644 --- a/.github/workflows/Dockerfile.tools +++ b/.github/workflows/Dockerfile.tools @@ -1,4 +1,4 @@ -FROM registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1 +FROM ghcr.io/openwrt/buildbot/buildworker-v3.8.0:v2 COPY --chown=buildbot staging_dir/host /prebuilt_tools/staging_dir/host COPY --chown=buildbot build_dir/host /prebuilt_tools/build_dir/host diff --git a/.github/workflows/build-tools.yml b/.github/workflows/build-tools.yml index 1507b0b056b..9b865f2608f 100644 --- a/.github/workflows/build-tools.yml +++ b/.github/workflows/build-tools.yml @@ -13,7 +13,7 @@ jobs: build: name: Build tools runs-on: ubuntu-latest - container: registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1 + container: ghcr.io/openwrt/buildbot/buildworker-v3.8.0:v2 steps: - name: Checkout From ff5d08799b741d021a9fa86927fac4f86f34b572 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 19 Apr 2023 19:47:40 +0100 Subject: [PATCH 11/14] generic: add support for wireless offloading on MT7981 Load appropriate firmware for wireless offloading on MT7981. Signed-off-by: Daniel Golle --- ...k_eth_soc-use-WO-firmware-for-MT7981.patch | 46 +++++++++++++++++++ ..._wed-move-cpuboot-in-a-dedicated-dts.patch | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 target/linux/generic/backport-5.15/733-v6.4-21-net-mtk_eth_soc-use-WO-firmware-for-MT7981.patch diff --git a/target/linux/generic/backport-5.15/733-v6.4-21-net-mtk_eth_soc-use-WO-firmware-for-MT7981.patch b/target/linux/generic/backport-5.15/733-v6.4-21-net-mtk_eth_soc-use-WO-firmware-for-MT7981.patch new file mode 100644 index 00000000000..9ce2735951c --- /dev/null +++ b/target/linux/generic/backport-5.15/733-v6.4-21-net-mtk_eth_soc-use-WO-firmware-for-MT7981.patch @@ -0,0 +1,46 @@ +From f5af7931d2a2cae66d0f9dad4ba517b1b00620b3 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Wed, 19 Apr 2023 19:07:23 +0100 +Subject: [PATCH] net: mtk_eth_soc: use WO firmware for MT7981 + +In order to support wireless offloading on MT7981 we need to load the +appropriate firmware. Recognize MT7981 and load mt7981_wo.bin. + +Signed-off-by: Daniel Golle +--- + drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 7 ++++++- + drivers/net/ethernet/mediatek/mtk_wed_wo.h | 1 + + 2 files changed, 7 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c ++++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c +@@ -326,7 +326,11 @@ mtk_wed_mcu_load_firmware(struct mtk_wed + wo->hw->index + 1); + + /* load firmware */ +- fw_name = wo->hw->index ? MT7986_FIRMWARE_WO1 : MT7986_FIRMWARE_WO0; ++ if (of_device_is_compatible(wo->hw->node, "mediatek,mt7981-wed")) ++ fw_name = MT7981_FIRMWARE_WO; ++ else ++ fw_name = wo->hw->index ? MT7986_FIRMWARE_WO1 : MT7986_FIRMWARE_WO0; ++ + ret = request_firmware(&fw, fw_name, wo->hw->dev); + if (ret) + return ret; +@@ -386,5 +390,6 @@ int mtk_wed_mcu_init(struct mtk_wed_wo * + 100, MTK_FW_DL_TIMEOUT); + } + ++MODULE_FIRMWARE(MT7981_FIRMWARE_WO); + MODULE_FIRMWARE(MT7986_FIRMWARE_WO0); + MODULE_FIRMWARE(MT7986_FIRMWARE_WO1); +--- a/drivers/net/ethernet/mediatek/mtk_wed_wo.h ++++ b/drivers/net/ethernet/mediatek/mtk_wed_wo.h +@@ -88,6 +88,7 @@ enum mtk_wed_dummy_cr_idx { + MTK_WED_DUMMY_CR_WO_STATUS, + }; + ++#define MT7981_FIRMWARE_WO "mediatek/mt7981_wo.bin" + #define MT7986_FIRMWARE_WO0 "mediatek/mt7986_wo_0.bin" + #define MT7986_FIRMWARE_WO1 "mediatek/mt7986_wo_1.bin" + diff --git a/target/linux/mediatek/patches-5.15/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch b/target/linux/mediatek/patches-5.15/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch index 3de1b27622d..9de4ffa433e 100644 --- a/target/linux/mediatek/patches-5.15/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch +++ b/target/linux/mediatek/patches-5.15/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch @@ -77,7 +77,7 @@ Signed-off-by: Lorenzo Bianconi wed_w32(wo->hw->wed_dev, MTK_WED_SCR0 + 4 * MTK_WED_DUMMY_CR_FWDL, --- a/drivers/net/ethernet/mediatek/mtk_wed_wo.h +++ b/drivers/net/ethernet/mediatek/mtk_wed_wo.h -@@ -227,7 +227,8 @@ struct mtk_wed_wo_queue { +@@ -228,7 +228,8 @@ struct mtk_wed_wo_queue { struct mtk_wed_wo { struct mtk_wed_hw *hw; From 67c1e7ad9bc75aa246ec4a38ab7ae7f088756fc6 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 9 May 2023 02:13:59 +0200 Subject: [PATCH 12/14] generic: mtk_eth_soc: don't crash if WO firmware is missing Import patch to prevent crashes in case WO firmware is missing on devices with only a single frontend (eg. MT7981+MT7976). Signed-off-by: Daniel Golle --- ..._eth_soc-fix-NULL-pointer-dereferenc.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 target/linux/generic/backport-5.15/733-v6.4-22-net-ethernet-mtk_eth_soc-fix-NULL-pointer-dereferenc.patch diff --git a/target/linux/generic/backport-5.15/733-v6.4-22-net-ethernet-mtk_eth_soc-fix-NULL-pointer-dereferenc.patch b/target/linux/generic/backport-5.15/733-v6.4-22-net-ethernet-mtk_eth_soc-fix-NULL-pointer-dereferenc.patch new file mode 100644 index 00000000000..d715c4aa686 --- /dev/null +++ b/target/linux/generic/backport-5.15/733-v6.4-22-net-ethernet-mtk_eth_soc-fix-NULL-pointer-dereferenc.patch @@ -0,0 +1,28 @@ +From 7c83e28f10830aa5105c25eaabe890e3adac36aa Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Tue, 9 May 2023 03:20:06 +0200 +Subject: [PATCH] net: ethernet: mtk_eth_soc: fix NULL pointer dereference + +Check for NULL pointer to avoid kernel crashing in case of missing WO +firmware in case only a single WEDv2 device has been initialized, e.g. on +MT7981 which can connect just one wireless frontend. + +Fixes: 86ce0d09e424 ("net: ethernet: mtk_eth_soc: use WO firmware for MT7981") +Signed-off-by: Daniel Golle +Reviewed-by: Simon Horman +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/mediatek/mtk_wed.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mediatek/mtk_wed.c ++++ b/drivers/net/ethernet/mediatek/mtk_wed.c +@@ -647,7 +647,7 @@ __mtk_wed_detach(struct mtk_wed_device * + BIT(hw->index), BIT(hw->index)); + } + +- if (!hw_list[!hw->index]->wed_dev && ++ if ((!hw_list[!hw->index] || !hw_list[!hw->index]->wed_dev) && + hw->eth->dma_dev != hw->eth->dev) + mtk_eth_set_dma_device(hw->eth, hw->eth->dev); + From d53fe5d9ce62c0fe9f5bc5c35cab15327a105fbd Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 15 May 2023 20:47:21 +0200 Subject: [PATCH 13/14] linux-firmware: update to 20230515 Package offloading firmware for MT7981 which has been added to linux-firmware recently and became available in this release. Changes since 20230515: 51290942 Merge branch 'main' of https://github.com/CirrusLogic/linux-firmware cc628d65 cirrus: Add firmware and tuning files for HP G10 series laptops 905d3265 linux-firmware: update firmware for mediatek bluetooth chip (MT7922) d1962891 WHENCE: Cleanup Realtek BT firmware provenance 6569484e linux-firmware: update firmware for MT7922 WiFi device 7d639e80 cnm: update chips&media wave521c firmware. b8a56bf2 cirrus: Add firmware and tuning files for Lenovo ThinkPad P1 Gen 6 6c9e0ed5 check_whence: error on directory listed as File 05183b7b check_whence: error on duplicate file entries c4423c91 WHENCE: comment out duplicate MediaTek firmware 2bc50f50 Merge branch 'mtl_guc_70.6.6' of git://anongit.freedesktop.org/drm/drm-firmware 192ee6d1 i915: Add GuC v70.6.6 for MTL 312c61f5 amdgpu: update DCN 3.1.6 DMCUB firmware 0061a2dd rtl_bt: Update RTL8852B BT USB firmware to 0xDBC6_B20F 1de22a39 rtl_bt: Update RTL8761B BT USB firmware to 0xDFC6_D922 dee0d4cd rtl_bt: Update RTL8761B BT UART firmware to 0x9DC6_D922 fab14965 Group all Conexant V4L devices together e88bdbe4 rtl_nic: update firmware of USB devices 6536a964 linux-firmware: Update firmware file for Intel Bluetooth AX200 2ca17876 linux-firmware: Update firmware file for Intel Bluetooth AX201 7610656f linux-firmware: Update firmware file for Intel Bluetooth AX203 209ba083 linux-firmware: Update firmware file for Intel Bluetooth AX203 a2739f05 linux-firmware: Update firmware file for Intel Bluetooth AX211 1ee587d5 linux-firmware: Update firmware file for Intel Bluetooth AX211 40ba7eee linux-firmware: Update firmware file for Intel Bluetooth AX210 bcbbf6bf linux-firmware: update firmware for MT7981 507ee862 Merge branch 'main' of github.com:sampathnimmmala/bt_firmware 2c6be1a4 qca: Update firmware files for BT chip WCN6750 8451c2b1 mt76xx: Move the old Mediatek WiFi firmware to mediatek 53e48f93 rtl_bt: Add firmware and config files for RTL8851B 69143e8e linux-firmware: Update AMD cpu microcode 1c942e46 Merge branch 'for-upstream' of https://github.com/CirrusLogic/linux-firmware 45530bcb linux-firmware: add firmware for MT7981 0d02ce69 linux-firmware: update firmware for MT7921 WiFi device 2deb2d30 linux-firmware: update firmware for mediatek bluetooth chip (MT7921) 9fdb844b linux-firmware: update qat firmware 74afc00d linux-firmware: Add firmware for Cirrus CS35L41 on Lenovo Laptops 86da2ac9 Merge https://github.com/pkshih/linux-firmware 5d0d24b3 linux-firmware: update firmware for MT7916 0aea9cdf Merge branch 'ath10k-20230405' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/linux-firmware 9f7502f1 rtw89: 8852b: update format-1 fw to v0.29.29.1 b9c8e9f7 rtw89: 8852c: update fw to v0.27.56.13 d1dc3048 ath11k: WCN6855 hw2.0: update board-2.bin 8115bd84 ath11k: WCN6750 hw1.0: update to WLAN.MSL.1.0.1-01160-QCAMSLSWPLZ-1 7d2ab030 ath11k: QCN9074 hw1.0: update to WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 b58b0869 ath11k: IPQ8074 hw2.0: update to WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 0747362d ath11k: IPQ8074 hw2.0: update board-2.bin 7262bd5d ath11k: IPQ6018 hw1.0: update to WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 aa98ffa3 ath11k: IPQ6018 hw1.0: update board-2.bin 2c67adc9 ath10k: QCA99X0 hw2.0: update board-2.bin a5dcb441 ath10k: QCA9984 hw1.0: update board-2.bin d0731d40 ath10k: QCA9888 hw2.0: update board-2.bin e13fedda ath10k: QCA6174 hw3.0: update board-2.bin 465dc284 ath10k: QCA4019 hw1.0: update board-2.bin 2e92a49f nvidia: update Tu10x and Tu11x signed firmware to support newer Turing HW 00258371 linux-firmware: update firmware for MT7922 WiFi device 33d8bf79 linux-firmware: update firmware for mediatek bluetooth chip (MT7922) 87bb6c9a Merge tag 'iwlwifi-fw-2023-03-30' of http://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware 956c1163 Merge branch 'mlimonci/update-dcn-3-1-4' of https://gitlab.freedesktop.org/superm1/linux-firmware 717e62eb linux-firmware: Amphion: Update vpu firmware 7bce2920 Merge https://github.com/pkshih/linux-firmware 78a8782a iwlwifi: add new FWs from core78-32 release a91d0e78 iwlwifi: update 9000-family firmwares to core78-32 9ee24ce0 amdgpu: Update SDMA 6.0.1 firmware 7df2a1ae amdgpu: Add PSP 13.0.11 firmware f098803d amdgpu: Update PSP 13.0.4 firmware 2cc9a4d0 amdgpu: Update GC 11.0.1 firmware eb13e669 amdgpu: Update DCN 3.1.4 firmware 898b7def amdgpu: Add GC 11.0.4 firmware e40a5b63 rtw88: 8822c: Update normal firmware to v9.9.15 bcdcfbcf linux-firmware: Update firmware file for Intel Bluetooth AX101 b422cdd6 linux-firmware: Update firmware file for Intel Bluetooth 9462 3e4c3b8d linux-firmware: Update firmware file for Intel Bluetooth 9462 6fcdb8e7 linux-firmware: Update firmware file for Intel Bluetooth 9560 46384d1c linux-firmware: Update firmware file for Intel Bluetooth 9560 1d797f86 linux-firmware: Update firmware file for Intel Bluetooth AX203 53c086b3 linux-firmware: Update firmware file for Intel Bluetooth AX203 9cc9745d linux-firmware: Update firmware file for Intel Bluetooth AX211 45319be8 linux-firmware: Update firmware file for Intel Bluetooth AX211 61d58194 linux-firmware: Update firmware file for Intel Bluetooth AX210 7f490a9a Merge branch 'dmc-adlp_2.19-mtl_2.12' of git://anongit.freedesktop.org/drm/drm-firmware dcac1477 Merge branch 'mtk-20230315' of https://github.com/tinghan-shen/linux_fw_scp 1f82dd25 linux-firmware: add firmware files for NXP BT chipsets 49ad74b3 Merge https://github.com/pkshih/linux-firmware 2c07f017 rtw89: 8852b: update format-1 fw to v0.29.29.0 b50cf920 rtw89: 8852b: add format-1 fw v0.29.26.0 416a66ca rtw89: 8852b: rollback firmware to v0.27.32.1 a18a444b i915: Update MTL DMC to v2.12 4ee236db i915: Update ADLP DMC to v2.19 d0997ff6 mediatek: Update mt8192/mt8195 SCP firmware to support MM21 and MT21 c761dbe8 Merge tag 'iwlwifi-fw-2023-03-13' of http://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware 5bc279fb iwlwifi: update core69 and core72 firmwares for So device Signed-off-by: Daniel Golle --- package/firmware/linux-firmware/Makefile | 4 ++-- package/firmware/linux-firmware/mediatek.mk | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile index 3ef4536724f..bed11fdbe1f 100644 --- a/package/firmware/linux-firmware/Makefile +++ b/package/firmware/linux-firmware/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linux-firmware -PKG_VERSION:=20230310 +PKG_VERSION:=20230515 PKG_RELEASE:=1 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=5968d4e5178ca1ecad3c41c36bba4602c288f25c7a48eeaa74113537578199b2 +PKG_HASH:=8b1acfa16f1ee94732a6acb50d9d6c835cf53af11068bd89ed207bbe04a1e951 PKG_MAINTAINER:=Felix Fietkau diff --git a/package/firmware/linux-firmware/mediatek.mk b/package/firmware/linux-firmware/mediatek.mk index c18058dd64e..77167aa8fe5 100644 --- a/package/firmware/linux-firmware/mediatek.mk +++ b/package/firmware/linux-firmware/mediatek.mk @@ -69,6 +69,15 @@ define Package/mt7922bt-firmware/install endef $(eval $(call BuildPackage,mt7922bt-firmware)) +Package/mt7981-wo-firmware = $(call Package/firmware-default,MT7981 offload firmware) +define Package/mt7981-wo-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/mediatek + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/mediatek/mt7981_wo.bin \ + $(1)/lib/firmware/mediatek +endef +$(eval $(call BuildPackage,mt7981-wo-firmware)) + Package/mt7986-wo-firmware = $(call Package/firmware-default,MT7986 offload firmware) define Package/mt7986-wo-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mediatek From d26ecbcf95e2c2ecf5380fdee733c6b46276e265 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 15 May 2023 21:56:27 +0200 Subject: [PATCH 14/14] linux-firmware: move firmware file for mt7601u The firmware file for mt7601u (MediaTek MT7601U Wireless MACs) has been moved to the mediatek/ folder by commit 8451c2b1 mt76xx: Move the old Mediatek WiFi firmware to mediatek Address this by updating the location of the firmware file in our linux-firmware Makefile generating the mt7601u-firmware package. All other MediaTek Wi-Fi firmware files are supplied by OpenWrt's own repository rather than being taken from linux-firmware. Fixes: d53fe5d9ce ("linux-firmware: update to 20230515") Signed-off-by: Daniel Golle --- package/firmware/linux-firmware/mediatek.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/firmware/linux-firmware/mediatek.mk b/package/firmware/linux-firmware/mediatek.mk index 77167aa8fe5..a0eccb8f4d5 100644 --- a/package/firmware/linux-firmware/mediatek.mk +++ b/package/firmware/linux-firmware/mediatek.mk @@ -1,9 +1,9 @@ Package/mt7601u-firmware = $(call Package/firmware-default,MediaTek MT7601U firmware) define Package/mt7601u-firmware/install - $(INSTALL_DIR) $(1)/lib/firmware + $(INSTALL_DIR) $(1)/lib/firmware/mediatek $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/mt7601u.bin \ - $(1)/lib/firmware + $(PKG_BUILD_DIR)/mediatek/mt7601u.bin \ + $(1)/lib/firmware/mediatek endef $(eval $(call BuildPackage,mt7601u-firmware))