From c80792e666f9a1f40d7b4b846874cdd66d22bd95 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 26 Sep 2024 16:29:43 -0700 Subject: [PATCH 1/4] cmake.mk: disable shared libs for host packages Disable for host to avoid having to use rpath hacks. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/16586 Signed-off-by: Robert Marko --- include/cmake.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/include/cmake.mk b/include/cmake.mk index 00ade7fd7debc7..87309dd0458a82 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -174,6 +174,7 @@ define Host/Configure/Default -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=TRUE \ -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=FALSE \ -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=TRUE \ + -DBUILD_SHARED_LIBS=OFF \ $(CMAKE_HOST_OPTIONS) \ $(HOST_CMAKE_SOURCE_DIR) \ ) From cc29e90d0c822720dcd92890d6ab61ce2e5fd9ac Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sun, 6 Oct 2024 22:02:37 +0200 Subject: [PATCH 2/4] ath10k-ct: select mac80211 debugfs support Trying to compile ath10k-ct without mac80211 debugfs support will result in: openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/ath10k-ct-regular/ath10k-ct-2024.07.30~ac71b14d/ath10k-6.10/wmi.h:8083:2: error: #warning Please enable ATH10K-DEBUGFS kernel option for optimal support for CT firmware. [-Werror=cpp] 8083 | #warning Please enable ATH10K-DEBUGFS kernel option for optimal support for CT firmware. | ^~~~~~~ cc1: all warnings being treated as errors So, since the driver itself is saying that debugfs is required, then lets make ath10k-ct select mac80211 debugfs support which is selected by default anyway. Fixes: #16302 Link: https://github.com/openwrt/openwrt/pull/16619 Signed-off-by: Robert Marko --- package/kernel/ath10k-ct/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile index dff32716c9ece0..f9795d8c8d2266 100644 --- a/package/kernel/ath10k-ct/Makefile +++ b/package/kernel/ath10k-ct/Makefile @@ -29,7 +29,7 @@ include $(INCLUDE_DIR)/package.mk define KernelPackage/ath10k-ct SUBMENU:=Wireless Drivers TITLE:=ath10k-ct driver optimized for CT ath10k firmware - DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11AC_SUPPORT @PCI_SUPPORT +kmod-hwmon-core + DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11AC_SUPPORT @PCI_SUPPORT +kmod-hwmon-core +@PACKAGE_MAC80211_DEBUGFS FILES:=\ $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_pci.ko \ $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko From 0b05cc70480af9056f2d1c1efdd464163c50a05a Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sun, 6 Oct 2024 21:42:23 +0200 Subject: [PATCH 3/4] tools: libdeflate: bump to 1.22 Bump to the latest 1.22 version which allows dropping our only patch. Changelog: Version 1.22 * The CMake-based build system now implements a workaround for gcc being paired with a too-old binutils version. This can prevent build errors. Version 1.21 * Fixed build error on x86 with gcc 8.1 and gcc 8.2. * Fixed build error on x86 when gcc 11 is paired with a binutils version that doesn't support AVX-VNNI, e.g. as it is on RHEL 9. * Fixed build error on arm64 with gcc 6. * Fixed build error on arm64 with gcc 13.1 and later with some -mcpu options. * Enabled detection of dotprod support in Windows ARM64 builds. Link: https://github.com/openwrt/openwrt/pull/16617 Signed-off-by: Robert Marko --- tools/libdeflate/Makefile | 6 ++-- ...se-AVX-VNNI-gcc-prerequisite-to-12.1.patch | 32 ------------------- 2 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 tools/libdeflate/patches/0001-lib-x86-increase-AVX-VNNI-gcc-prerequisite-to-12.1.patch diff --git a/tools/libdeflate/Makefile b/tools/libdeflate/Makefile index 6bf25d134d0e3d..8f7946d90ed76c 100644 --- a/tools/libdeflate/Makefile +++ b/tools/libdeflate/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libdeflate -PKG_VERSION:=1.20 -PKG_RELEASE:=2 +PKG_VERSION:=1.22 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate/releases/download/v$(PKG_VERSION) -PKG_HASH:=c52cf0239fd644d71c9e88613dd7431a5306ebee1280c5791c71ca264869250a +PKG_HASH:=7834d9adbc9a809e0fb0d7b486060a9ae5f7819eb7f55bb8c22b10d7b3bed8da include $(INCLUDE_DIR)/host-build.mk diff --git a/tools/libdeflate/patches/0001-lib-x86-increase-AVX-VNNI-gcc-prerequisite-to-12.1.patch b/tools/libdeflate/patches/0001-lib-x86-increase-AVX-VNNI-gcc-prerequisite-to-12.1.patch deleted file mode 100644 index ea4f4dc4c139ca..00000000000000 --- a/tools/libdeflate/patches/0001-lib-x86-increase-AVX-VNNI-gcc-prerequisite-to-12.1.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e522b1d09d3536ddc15459b4259150f4a53ee65a Mon Sep 17 00:00:00 2001 -From: Eric Biggers -Date: Thu, 4 Apr 2024 20:16:33 -0400 -Subject: [PATCH] lib/x86: increase AVX-VNNI gcc prerequisite to 12.1 - -Although gcc 11.1 supports AVX-VNNI, a popular distro pairs it with a -binutils version that does not. Require gcc 12 instead. - -Resolves https://github.com/ebiggers/libdeflate/issues/365 ---- - lib/x86/adler32_impl.h | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - ---- a/lib/x86/adler32_impl.h -+++ b/lib/x86/adler32_impl.h -@@ -52,8 +52,15 @@ - /* - * AVX-VNNI implementation. This is used on CPUs that have AVX2 and AVX-VNNI - * but don't have AVX-512, for example Intel Alder Lake. -+ * -+ * Unusually for a new CPU feature, gcc added support for the AVX-VNNI -+ * intrinsics (in gcc 11.1) slightly before binutils added support for -+ * assembling AVX-VNNI instructions (in binutils 2.36). Distros can reasonably -+ * have gcc 11 with binutils 2.35. Because of this issue, we check for gcc 12 -+ * instead of gcc 11. (libdeflate supports direct compilation without a -+ * configure step, so checking the binutils version is not always an option.) - */ --#if GCC_PREREQ(11, 1) || CLANG_PREREQ(12, 0, 13000000) || MSVC_PREREQ(1930) -+#if GCC_PREREQ(12, 1) || CLANG_PREREQ(12, 0, 13000000) || MSVC_PREREQ(1930) - # define adler32_x86_avx2_vnni adler32_x86_avx2_vnni - # define SUFFIX _avx2_vnni - # define ATTRIBUTES _target_attribute("avx2,avxvnni") From dae6a871de3df0adca5b7f29a32c8c0642a9415e Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 5 Oct 2024 18:20:35 +0100 Subject: [PATCH 4/4] base-files: don't wipe LED state when adding a single LED Only replace LED state of a single LED instead of removing the entire /var/run/led.state file. Fixes: 511e8f84d0 ("base-files: configure LED when added") Signed-off-by: Daniel Golle --- package/base-files/files/etc/init.d/led | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led index 5130ac7d41bb7e..7f05254c2ba3a3 100755 --- a/package/base-files/files/etc/init.d/led +++ b/package/base-files/files/etc/init.d/led @@ -184,7 +184,12 @@ start() { echo "$color" | sed 's/:/\ /g' > \ "/sys/class/leds/$led/multi_intensity" done < /var/run/led.state - rm /var/run/led.state + if [ "$1" ]; then + grep -v "^$1 " /var/run/led.state > /var/run/led.state.new + mv /var/run/led.state.new /var/run/led.state + else + rm /var/run/led.state + fi } config_load system